File sblim-cmpi-dhcp-1.0.patch of Package sblim-cmpi-dhcp

diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-sblim-cmpi-dhcp-1.0/hashing/libuniquekey.c ./hashing/libuniquekey.c
--- ../orig-sblim-cmpi-dhcp-1.0/hashing/libuniquekey.c	2009-09-16 00:49:43.000000000 +0200
+++ ./hashing/libuniquekey.c	2022-07-09 20:04:10.898529653 +0200
@@ -556,8 +556,10 @@
 
     hashIdArray = (unsigned long long *)calloc((fsize/17 + 5), sizeof(unsigned long long)); 
     fileD = fopen(keyfile, "r");
-    if(keyfile == NULL) 
+    if(fileD == NULL) {
+        free(filename);
 	return NULL;
+    }
 
     for(fsize = 0; ((read = getline(&linebuf, &len, fileD)) != -1); fsize++)
 	hashIdArray[fsize] = _UQ_strToHex(linebuf); /** prepare the hexstring and add it to the hashIdArray */
openSUSE Build Service is sponsored by