Free buffer in error case.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28529 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
01406f374d
commit
53bc794334
@ -447,8 +447,10 @@ NetworkStatusView::_Update(bool force)
|
||||
|
||||
config.ifc_len = count * sizeof(struct ifreq);
|
||||
config.ifc_buf = buffer;
|
||||
if (ioctl(fSocket, SIOCGIFCONF, &config, sizeof(struct ifconf)) < 0)
|
||||
if (ioctl(fSocket, SIOCGIFCONF, &config, sizeof(struct ifconf)) < 0) {
|
||||
free(buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
ifreq *interface = (ifreq *)buffer;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user