fixed memory leak.

Obtained From: KAME
This commit is contained in:
suz 2003-09-20 09:41:13 +00:00
parent afa1f29efd
commit 6e6824e4bc

View File

@ -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);
}