1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-08 04:58:40 +03:00

lib: Fix an error path memleak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Volker Lendecke 2024-05-23 16:12:53 +02:00
parent 0321f31a8e
commit 5ae1605fc2

View File

@ -308,8 +308,11 @@ bool ber_write_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char *OID)
v = smb_strtoul(p, &newp, 10, &error, SMB_STR_STANDARD);
if (newp[0] == '.' || error != 0) {
p = newp + 1;
/* check for empty last component */
if (!*p) return false;
if (!*p) {
/* empty last component */
data_blob_free(blob);
return false;
}
} else if (newp[0] == '\0') {
p = newp;
} else {