Mercurial > pidgin.yaz
diff src/sslconn.c @ 13986:8a8b4f7f7d99
[gaim-migrate @ 16556]
Fix a minor case of accessing something that had been free'd in oscar,
and some other minor cleanup. FYI "0" is a valid file descriptor,
but it will pretty much always be STDOUT, STDERR or STDIN. But I
like to check for -1 anyway, because I'm weird.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 24 Jul 2006 04:27:42 +0000 |
parents | b76c6de0c3b5 |
children | 10e8eb6a4910 |
line wrap: on
line diff
--- a/src/sslconn.c Mon Jul 24 01:03:07 2006 +0000 +++ b/src/sslconn.c Mon Jul 24 04:27:42 2006 +0000 @@ -137,7 +137,7 @@ GaimSslConnection *gsc; GaimSslOps *ops; - g_return_val_if_fail(fd > 0, NULL); + g_return_val_if_fail(fd != -1, NULL); g_return_val_if_fail(func != NULL, NULL); g_return_val_if_fail(gaim_ssl_is_supported(), NULL); @@ -178,12 +178,10 @@ if (ops != NULL && ops->close != NULL) (ops->close)(gsc); - if (gsc->fd) + if (gsc->fd != -1) close(gsc->fd); - if (gsc->host != NULL) - g_free(gsc->host); - + g_free(gsc->host); g_free(gsc); }