File: ypbind3_binding_free.c

package info (click to toggle)
ypbind-mt 2.7.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,012 kB
  • sloc: sh: 4,375; ansic: 3,091; xml: 372; makefile: 62; sed: 16
file content (35 lines) | stat: -rw-r--r-- 1,119 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* Copyright (C) 2014 Thorsten Kukuk
   Author: Thorsten Kukuk <kukuk@suse.de>

   This library is free software: you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public License
   in version 2.1 as published by the Free Software Foundation.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>. */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <rpcsvc/yp_prot.h>
#include "ypbind3_binding.h"

void
__ypbind3_binding_free (struct ypbind3_binding *ypb)
{
  if (ypb == NULL)
    return;
  /* netdir_free ((void *)ypb->ypbind_svcaddr, ND_ADDR); */
  if (ypb->ypbind_svcaddr->buf)
    free (ypb->ypbind_svcaddr->buf);
  free (ypb->ypbind_svcaddr);
  free (ypb->ypbind_servername);
  freenetconfigent (ypb->ypbind_nconf);
  free (ypb);
}