Destroy mutex if strdup failed

Signed-off-by: npes87184 <npes87184@gmail.com>
This commit is contained in:
npes87184 2018-08-12 09:20:06 +08:00 committed by Romain Vimont
parent ec66b3be82
commit a3ab92226d

View file

@ -69,6 +69,7 @@ SDL_bool installer_init(struct installer *installer, const char *serial) {
installer->serial = SDL_strdup(serial);
if (!installer->serial) {
LOGW("Cannot strdup serial");
SDL_DestroyMutex(installer->mutex);
return SDL_FALSE;
}
} else {