fixed memory leak.

Obtained From: KAME
This commit is contained in:
SUZUKI Shinsuke 2003-09-20 09:41:13 +00:00
parent bcf5e4d6b1
commit f9547841bc

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