Set 'bits.close' in case of malloc fail.
Don't free 'lud_dn' twice in case curl_unescape() fails.
This commit is contained in:
parent
14aa3fa258
commit
32d76a5b57
@ -380,6 +380,7 @@ quit:
|
|||||||
|
|
||||||
/* no data to transfer */
|
/* no data to transfer */
|
||||||
Curl_Transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
|
Curl_Transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
|
||||||
|
conn->bits.close = TRUE;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -474,9 +475,9 @@ static bool unescape_elements (LDAPURLDesc *ludp)
|
|||||||
char *new_dn = curl_unescape(dn, 0);
|
char *new_dn = curl_unescape(dn, 0);
|
||||||
|
|
||||||
free(dn);
|
free(dn);
|
||||||
|
ludp->lud_dn = new_dn;
|
||||||
if (!new_dn)
|
if (!new_dn)
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
ludp->lud_dn = new_dn;
|
|
||||||
}
|
}
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user