Fixing minor memory leak when dbPutConvertJSON call fails

This commit is contained in:
Jakub Wlodek authored and mdavidsaver committed 2026-02-08 08:15:44 -08:00
1 parent 7e3255ff8e
commit 4fe5f75387
1 file changed
+3 -1
+3 -1
View File
@@ -422,8 +422,10 @@ long dbpf(const char *pname,const char *pvalue)
return -1;
}
status = dbPutConvertJSON(pvalue, dbrType, array, &n);
if (status)
if (status) {
free(array);
return status;
}
pvalue = array;
}
}