1
mirror of https://github.com/rapid7/metasploit-payloads synced 2024-11-20 14:39:22 +01:00

remove unneeded checks before free, one being an impossible scenario

This commit is contained in:
Brent Cook 2020-04-07 17:15:03 -05:00
parent 8b4d65de47
commit bf8950ebe9

View File

@ -49,10 +49,7 @@ Remote* remote_allocate()
pivot_tree_destroy(remote->pivot_listeners);
}
if (remote)
{
free(remote);
}
free(remote);
vdprintf("[REMOTE] here 3");
return NULL;
@ -73,10 +70,7 @@ VOID remote_deallocate(Remote * remote)
lock_destroy(remote->lock);
}
if (remote->orig_config)
{
free(remote->orig_config);
}
free(remote->orig_config);
// Wipe our structure from memory
memset(remote, 0, sizeof(Remote));