Change in osmo-sysmon[master]: fix file descriptor leak in osysmon_file_read

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Tue Nov 27 11:06:14 UTC 2018


Max has posted comments on this change. ( https://gerrit.osmocom.org/11943 )

Change subject: fix file descriptor leak in osysmon_file_read
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/#/c/11943/1/osysmon_file.c
File osysmon_file.c:

https://gerrit.osmocom.org/#/c/11943/1/osysmon_file.c@90
PS1, Line 90: 		return;
Shouldn't we close it here as well?


https://gerrit.osmocom.org/#/c/11943/1/osysmon_file.c@96
PS1, Line 96: 	fclose(f);
Actually I think we can close it right after fgets() but before checking it's result. This would require moving fgets() outside of if. Not sure if it's better or not.



-- 
To view, visit https://gerrit.osmocom.org/11943
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sysmon
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie1b5734748438c6d785cd96dfa9af6303cd102da
Gerrit-Change-Number: 11943
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Stefan Sperling <ssperling at sysmocom.de>
Gerrit-Comment-Date: Tue, 27 Nov 2018 11:06:14 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181127/00123e0b/attachment.htm>


More information about the gerrit-log mailing list