Fix resource leak
authorColin Leroy <colin@colino.net>
Thu, 8 Oct 2015 17:18:53 +0000 (19:18 +0200)
committerColin Leroy <colin@colino.net>
Thu, 8 Oct 2015 17:18:53 +0000 (19:18 +0200)
src/jpilot.c

index fde63ce..43f58f4 100644 (file)
@@ -872,6 +872,7 @@ static gint jpilot_read_db_files( JPilotFile *pilotFile, GList **records ) {
                        }
                }
                if (fseek( in, next_offset, SEEK_SET ) < 0) {
+                       free_mem_rec_header( &mem_rh );
                        fclose(in);
                        return MGU_ERROR_READ;
                }