diff --git a/plugins/CDVDiso/src/libiso.cpp b/plugins/CDVDiso/src/libiso.cpp index 7275ece2a9..577a00a808 100644 --- a/plugins/CDVDiso/src/libiso.cpp +++ b/plugins/CDVDiso/src/libiso.cpp @@ -631,8 +631,8 @@ isoFile *isoCreate(const char *filename, int flags) iso->handle = _openfile(iso->filename, O_WRONLY | O_CREAT); if (iso->handle == NULL) { - free(iso); printf("Error loading %s\n", iso->filename); + free(iso); return NULL; } printf("isoCreate: %s ok\n", iso->filename);