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:
Stephan Aßmus 2008-11-06 11:18:01 +00:00
parent 01406f374d
commit 53bc794334

View File

@ -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;