Skip to content

Commit 061fade

Browse files
authored
Merge pull request #3391 from amezin/socket-leak
Fix resource leaks in `msc_status_engine_mac_address`
2 parents 0923377 + 0a70b0e commit 061fade

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

apache2/msc_status_engine.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ int DSOLOCAL msc_status_engine_mac_address (unsigned char *mac)
182182
(unsigned char)LLADDR(sdl)[3],
183183
(unsigned char)LLADDR(sdl)[4],
184184
(unsigned char)LLADDR(sdl)[5]);
185-
goto end;
185+
break;
186186
}
187187
}
188188

@@ -225,7 +225,7 @@ int DSOLOCAL msc_status_engine_mac_address (unsigned char *mac)
225225
(unsigned char)ifr->ifr_addr.sa_data[4],
226226
(unsigned char)ifr->ifr_addr.sa_data[5]);
227227

228-
goto end;
228+
break;
229229
}
230230
}
231231
close( sock );
@@ -268,15 +268,14 @@ int DSOLOCAL msc_status_engine_mac_address (unsigned char *mac)
268268
(unsigned char)pAdapter->Address[3],
269269
(unsigned char)pAdapter->Address[4],
270270
(unsigned char)pAdapter->Address[5]);
271-
goto end;
271+
break;
272272
}
273273
pAdapter = pAdapter->Next;
274274
}
275275

276276
free(pAdapterInfo);
277277
#endif
278278

279-
end:
280279
return 0;
281280
failed:
282281
return -1;

0 commit comments

Comments
 (0)