Issue 103768 - soltools/mkdepend/main.c:resource leak
Summary: soltools/mkdepend/main.c:resource leak
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: solenv (show other issues)
Version: OOo 3.1
Hardware: All Linux, all
: P4 Trivial (vote)
Target Milestone: OOo 3.3
Assignee: dtardon
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks: 106602
  Show dependency tree
 
Reported: 2009-07-24 10:00 UTC by dcb314
Modified: 2009-11-17 16:23 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
fairly harmless as its a build-time tool, but an easy fix (472 bytes, patch)
2009-10-30 21:50 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description dcb314 2009-07-24 10:00:47 UTC
For source code file soltools/mkdepend/main.c,
around line 660 is the source code for function
redirect.

I can see source code line

       if ((fdin = fopen(makefile, "r")) == NULL)

but no matching call to fclose. This seems to be a resource
leak to me. Suggest add call to fclose, somewhere near
the end of the routine.
Comment 1 caolanm 2009-10-30 21:50:49 UTC
Created attachment 65808 [details]
fairly harmless as its a build-time tool, but an easy fix
Comment 2 caolanm 2009-10-30 21:51:12 UTC
confirmed, added a patch
Comment 3 caolanm 2009-10-31 11:59:06 UTC
grabbing this
Comment 4 caolanm 2009-10-31 11:59:55 UTC
done in cmcfixes65
Comment 5 caolanm 2009-11-03 14:27:02 UTC
reassigning for qaing
Comment 6 dtardon 2009-11-05 14:17:18 UTC
verified in cmcfixes65
Comment 7 caolanm 2009-11-17 16:23:33 UTC
closed, integrated m65