core: Fix multiple trivial issues in the core.

* Fix small leaks in from error conditions in sdp.c and translate.c.
* Check new file descriptor is less than 0, not less than or equal.

Change-Id: Id7782775486175c739e0c4bf3ea5e17e3f452a99
This commit is contained in:
Corey Farrell
2017-12-19 00:17:08 -05:00
parent 11a1e07ad2
commit bf33a09c37
3 changed files with 4 additions and 4 deletions

View File

@@ -2615,7 +2615,7 @@ void ast_set_default_eid(struct ast_eid *eid)
unsigned char full_mac[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
s = socket(AF_INET, SOCK_STREAM, 0);
if (s <= 0) {
if (s < 0) {
ast_log(LOG_WARNING, "Unable to open socket for seeding global EID. "
"You will have to set it manually.\n");
return;