fixed memory leak.
Obtained From: KAME
This commit is contained in:
parent
afa1f29efd
commit
6e6824e4bc
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user