mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-15 02:20:46 +00:00
Fix file descriptor leak on error in read_igmp()
Detected by cppcheck. Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
This commit is contained in:
parent
297452a1c2
commit
19bcc05bea
@ -128,8 +128,10 @@ void read_igmp(struct ma_info **result_p)
|
||||
if (!fp)
|
||||
return;
|
||||
memset(&m, 0, sizeof(m));
|
||||
if (!fgets(buf, sizeof(buf), fp))
|
||||
if (!fgets(buf, sizeof(buf), fp)) {
|
||||
fclose(fp);
|
||||
return;
|
||||
}
|
||||
|
||||
m.addr.family = AF_INET;
|
||||
m.addr.bitlen = 32;
|
||||
|
Loading…
Reference in New Issue
Block a user