mirror of
https://github.com/wiiu-env/ftpiiu_plugin.git
synced 2024-11-18 02:39:21 +01:00
Only call socExit() if socInit() succeeded
This commit is contained in:
parent
56b509e58e
commit
c7cd0ec231
@ -1567,6 +1567,7 @@ ftp_init(void)
|
|||||||
#ifdef _3DS
|
#ifdef _3DS
|
||||||
soc_fail:
|
soc_fail:
|
||||||
free(SOCU_buffer);
|
free(SOCU_buffer);
|
||||||
|
SOCU_buffer = NULL;
|
||||||
|
|
||||||
memalign_fail:
|
memalign_fail:
|
||||||
#ifdef ENABLE_LOGGING
|
#ifdef ENABLE_LOGGING
|
||||||
@ -1577,7 +1578,6 @@ ftruncate_fail:
|
|||||||
log_fail:
|
log_fail:
|
||||||
#endif
|
#endif
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1601,10 +1601,14 @@ ftp_exit(void)
|
|||||||
/* deinitialize SOC service */
|
/* deinitialize SOC service */
|
||||||
console_render();
|
console_render();
|
||||||
console_print(CYAN "Waiting for socExit()...\n" RESET);
|
console_print(CYAN "Waiting for socExit()...\n" RESET);
|
||||||
|
|
||||||
|
if(SOCU_buffer != NULL)
|
||||||
|
{
|
||||||
ret = socExit();
|
ret = socExit();
|
||||||
if(ret != 0)
|
if(ret != 0)
|
||||||
console_print(RED "socExit: 0x%08X\n" RESET, (unsigned int)ret);
|
console_print(RED "socExit: 0x%08X\n" RESET, (unsigned int)ret);
|
||||||
free(SOCU_buffer);
|
free(SOCU_buffer);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_LOGGING
|
#ifdef ENABLE_LOGGING
|
||||||
/* close log file */
|
/* close log file */
|
||||||
|
Loading…
Reference in New Issue
Block a user