Rich Megginson wrote:
https://bugzilla.mozilla.org/show_bug.cgi?id=323374
Files: https://bugzilla.mozilla.org/attachment.cgi?id=208698
Diffs: https://bugzilla.mozilla.org/attachment.cgi?id=208699
1) I'm pretty sure the reference to socket should be fd instead. I
don't know why it compiled with socket in there . . . note to self:
read compiler warnings . . .
2) The cert returned by SSL_PeerCertificate is "dup"ed, so we need to
call CERT_DestroyCertificate to release it otherwise we'll leak
references.
3) The hostname returned by SSL_RevealURL is strduped and must be freed.
Looking at:
+ if (hostname) {
+ PL_strfree(hostname);
+ }
Isn't PL_strfree() -- which calls free() -- NULL safe?
So when you check the pointer for non-NULL, you're duplicating
code inside of free().
-Philip
_______________________________________________
mozilla-directory mailing list
mozilla-directory@mozilla.org
http://mail.mozilla.org/listinfo/mozilla-directory