mirror of
https://github.com/nmap/nmap.git
synced 2025-12-14 19:59:02 +00:00
Avoid use-after-free.
This commit is contained in:
@@ -172,8 +172,8 @@ int netrun(struct fdinfo *fdn, char *cmdexec)
|
|||||||
|
|
||||||
pid = start_subprocess(cmdexec, info);
|
pid = start_subprocess(cmdexec, info);
|
||||||
if (pid == -1) {
|
if (pid == -1) {
|
||||||
free(info);
|
|
||||||
close(info->fdn.fd);
|
close(info->fdn.fd);
|
||||||
|
free(info);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user