]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Fix: Use "solv_free" for memory allocated by "solv_calloc"
authorJaroslav Rohel <jrohel@redhat.com>
Tue, 6 Apr 2021 07:17:27 +0000 (09:17 +0200)
committerJaroslav Rohel <jrohel@redhat.com>
Tue, 6 Apr 2021 08:16:09 +0000 (10:16 +0200)
ext/solv_xfopen.c

index b3136cbbe862a9b742d606f3a7a1f229d84e8ffb..a5de9e6253585dbee45dd6799ded811a4155f67d 100644 (file)
@@ -199,7 +199,7 @@ static LZFILE *lzopen(const char *path, const char *mode, int fd, int isxz)
   if (ret != LZMA_OK)
     {
       fclose(fp);
-      free(lzfile);
+      solv_free(lzfile);
       return 0;
     }
   return lzfile;
@@ -232,7 +232,7 @@ static int lzclose(void *cookie)
     }
   lzma_end(&lzfile->strm);
   rc = fclose(lzfile->file);
-  free(lzfile);
+  solv_free(lzfile);
   return rc;
 }
 
@@ -432,7 +432,7 @@ static int zstdclose(void *cookie)
       ZSTD_freeDStream(zstdfile->dstream);
     }
   rc = fclose(zstdfile->file);
-  free(zstdfile);
+  solv_free(zstdfile);
   return rc;
 }