mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
gencache: Fix SAFE_FREE vs data_blob_free
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
committed by
Jeremy Allison
parent
aaa6a688cf
commit
f630360b7f
@ -715,12 +715,12 @@ bool gencache_get(const char *keystr, char **value, time_t *ptimeout)
|
||||
return false;
|
||||
}
|
||||
if ((blob.data == NULL) || (blob.length == 0)) {
|
||||
SAFE_FREE(blob.data);
|
||||
data_blob_free(&blob);
|
||||
return false;
|
||||
}
|
||||
if (blob.data[blob.length-1] != '\0') {
|
||||
/* Not NULL terminated, can't be a string */
|
||||
SAFE_FREE(blob.data);
|
||||
data_blob_free(&blob);
|
||||
return false;
|
||||
}
|
||||
if (value) {
|
||||
|
Reference in New Issue
Block a user