fixed from PVS-Studio

V773 The function was exited without releasing the 'mmfile' pointer. A memory leak is possible. load_abc.cpp 441
pull/31/head
ip_gpu 9 years ago
parent 77938cd0be
commit 96cf1d0cd1

@ -438,6 +438,7 @@ static MMFILE *mmfopen(const char *name, const char *mode)
mmfile = (MMFILE *)malloc(len+sizeof(MMFILE));
if( !mmfile || len <= 0 ) {
fclose(fp);
free(mmfile);
return NULL;
}
fseek(fp, 0, SEEK_SET);

Loading…
Cancel
Save