forked from qt-creator/qt-creator
mdnssd: avoid leaking descriptors
fixes upstream bug Change-Id: Ic971e5a9566319ec3baea0a381271fd3bd8d49bc Reviewed-by: Nikolai Kosjar <nikolai.kosjar@nokia.com>
This commit is contained in:
@@ -204,8 +204,10 @@ struct ifi_info *get_ifi_info_linuxv6(int family, int doaliases)
|
|||||||
res0=NULL;
|
res0=NULL;
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
if (sockfd != -1) {
|
if (fp != NULL)
|
||||||
assert(close(sockfd) == 0);
|
fclose(fp);
|
||||||
|
if (sockfd != -1 && close(sockfd) != 0) {
|
||||||
|
assert(1);
|
||||||
}
|
}
|
||||||
return(ifihead); /* pointer to first structure in linked list */
|
return(ifihead); /* pointer to first structure in linked list */
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user