diff options
author | Michael Adam <obnox@samba.org> | 2008-02-29 02:22:02 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-02-29 02:22:02 +0100 |
commit | daab914cafba742ff9fcb3aab55cc812cf415058 (patch) | |
tree | 5e9afe05f42c359102ae3664497975a03ae703a0 /source4/lib/replace/test/getifaddrs.c | |
parent | a9706ba3c1e08243a761cb9c32b605e9f41535de (diff) | |
download | samba-daab914cafba742ff9fcb3aab55cc812cf415058.tar.gz samba-daab914cafba742ff9fcb3aab55cc812cf415058.tar.bz2 samba-daab914cafba742ff9fcb3aab55cc812cf415058.zip |
libreplace: fix silly crashbug in getifaddrs_test().
Michael
(This used to be commit 523626908d25f974fd1ae6d7306b1d4bc8414162)
Diffstat (limited to 'source4/lib/replace/test/getifaddrs.c')
-rw-r--r-- | source4/lib/replace/test/getifaddrs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/replace/test/getifaddrs.c b/source4/lib/replace/test/getifaddrs.c index 4455462193..c78c9b545e 100644 --- a/source4/lib/replace/test/getifaddrs.c +++ b/source4/lib/replace/test/getifaddrs.c @@ -51,9 +51,11 @@ static const char *format_sockaddr(struct sockaddr *addr, int getifaddrs_test(void) { struct ifaddrs *ifs = NULL; + struct ifaddrs *ifs_head = NULL; int ret; ret = getifaddrs(&ifs); + ifs_head = ifs; if (ret != 0) { fprintf(stderr, "getifaddrs() failed: %s\n", strerror(errno)); return 1; @@ -90,7 +92,7 @@ int getifaddrs_test(void) ifs = ifs->ifa_next; } - freeifaddrs(ifs); + freeifaddrs(ifs_head); return 0; } |