diff options
author | suz <suz@FreeBSD.org> | 2003-09-20 09:41:13 +0000 |
---|---|---|
committer | suz <suz@FreeBSD.org> | 2003-09-20 09:41:13 +0000 |
commit | 6e6824e4bcd845d2681902b69bf6bd16809bbc05 (patch) | |
tree | 6b0fe806255930482e8c22319158ee9ac52c82e1 /usr.sbin/rtadvd | |
parent | afa1f29efdcddc959e0a79c321d6f62aa1074dee (diff) | |
download | FreeBSD-src-6e6824e4bcd845d2681902b69bf6bd16809bbc05.zip FreeBSD-src-6e6824e4bcd845d2681902b69bf6bd16809bbc05.tar.gz |
fixed memory leak.
Obtained From: KAME
Diffstat (limited to 'usr.sbin/rtadvd')
-rw-r--r-- | usr.sbin/rtadvd/if.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/rtadvd/if.c b/usr.sbin/rtadvd/if.c index a6517f2..07d9e1f 100644 --- a/usr.sbin/rtadvd/if.c +++ b/usr.sbin/rtadvd/if.c @@ -128,8 +128,11 @@ if_nametosdl(char *name) } if ((ret_sdl = malloc(sdl->sdl_len)) == NULL) - return(NULL); + goto end; memcpy((caddr_t)ret_sdl, (caddr_t)sdl, sdl->sdl_len); + +end: + free(buf); return(ret_sdl); } |