]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
openssl-util: avoid freeing invalid pointer
authorDavid Tardon <dtardon@redhat.com>
Tue, 12 Dec 2023 14:47:33 +0000 (15:47 +0100)
committerMike Yuan <me@yhndnzj.com>
Tue, 12 Dec 2023 23:28:30 +0000 (07:28 +0800)
src/shared/openssl-util.c

index 311fb4d9cbb04b16f52769cfbf5e2fc85aa35af1..b0a5563395a041f73bc43a59a71f691f74551372 100644 (file)
@@ -1109,7 +1109,7 @@ int string_hashsum(
 
         _cleanup_free_ void *hash = NULL;
         size_t hash_size;
-        _cleanup_free_ char *enc;
+        _cleanup_free_ char *enc = NULL;
         int r;
 
         assert(s || len == 0);