mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
command: Fix possible null dereference in rarch_cmd_free
Free called on null pointers is OK, but if it's ever null and it hits this conditional, it will be a null pointer dereference.
This commit is contained in:
parent
7fc59210b1
commit
a300ce5b2e
@ -161,7 +161,7 @@ error:
|
|||||||
void rarch_cmd_free(rarch_cmd_t *handle)
|
void rarch_cmd_free(rarch_cmd_t *handle)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
|
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
|
||||||
if (handle->net_fd >= 0)
|
if (handle && handle->net_fd >= 0)
|
||||||
close(handle->net_fd);
|
close(handle->net_fd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user