Project

General

Profile

Bug #6030

Possible memory leak in select_server_addr()

Added by Marcel Telka about 5 years ago. Updated over 2 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
lib - userland libraries
Start date:
2015-06-24
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

There is possible leak of sock at line 681 here in select_server_addr():

656    sock = calloc(1, sizeof (struct sockaddr_in6));
657    if (sock == NULL) {
658        return (FALSE);
659    }

...

677    /* open a UDP socket */
678    tmp_fd = _so_socket(family, SOCK_DGRAM, 0, NULL, SOV_SOCKBSD);
679    if (tmp_fd < 0) {
680        syslog(LOG_ERR, "select_server_addr: connect failed\n");
681        return (FALSE);
682    }

Thanks to Jeffry for noticing this.

History

#1

Updated by Marcel Telka over 2 years ago

  • Subject changed from Possible memory leak in select_server_addr(). to Possible memory leak in select_server_addr()

Also available in: Atom PDF