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:
parent
0321f31a8e
commit
5ae1605fc2
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user