Message ID | CAC+sh-dSpNLcdwkJA_J+XPFCxmMibgcAbof71o2eQ2pK5O2b-A@mail.gmail.com |
---|---|
State | Committed |
Headers |
Received: (qmail 4604 invoked by alias); 10 Sep 2014 20:21:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 4591 invoked by uid 89); 10 Sep 2014 20:21:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qa0-f49.google.com MIME-Version: 1.0 X-Received: by 10.224.95.9 with SMTP id b9mr64603855qan.61.1410380483555; Wed, 10 Sep 2014 13:21:23 -0700 (PDT) Date: Wed, 10 Sep 2014 22:21:23 +0200 Message-ID: <CAC+sh-dSpNLcdwkJA_J+XPFCxmMibgcAbof71o2eQ2pK5O2b-A@mail.gmail.com> Subject: [PATCH] memory leak in libio/wfileops.c do_ftell_wide [BZ #17370] From: Tim Lammens <tim.lammens@gmail.com> To: libc-alpha@sourceware.org Content-Type: text/plain; charset=UTF-8 |
Commit Message
Tim Lammens
Sept. 10, 2014, 8:21 p.m. UTC
Hi, Here is a patch to fix the memory leak in libio/wfileops.c. Regards, Tim
Comments
On Wed, Sep 10, 2014 at 10:21:23PM +0200, Tim Lammens wrote: > Hi, > > Here is a patch to fix the memory leak in libio/wfileops.c. Thanks, I'll push this fix. Your submission is lacking a ChangeLog, but I'll write it up for you. If you're looking to contribute more regularly, you might want to review the contribution checklist[1]. Siddhesh [1] https://sourceware.org/glibc/wiki/Contribution%20checklist > > Regards, > Tim > > > diff --git a/libio/wfileops.c b/libio/wfileops.c > index f123add..4b8fda9 100644 > --- a/libio/wfileops.c > +++ b/libio/wfileops.c > @@ -711,6 +711,7 @@ do_ftell_wide (_IO_FILE *fp) > return WEOF; > > offset += outstop - out; > + free(out); > } > > /* We don't trust _IO_read_end to represent the current file offset
Great! My apologies, I didn't see the checklist in time. Regards, Tim On Thu, Sep 11, 2014 at 1:05 AM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote: > On Wed, Sep 10, 2014 at 10:21:23PM +0200, Tim Lammens wrote: >> Hi, >> >> Here is a patch to fix the memory leak in libio/wfileops.c. > > Thanks, I'll push this fix. Your submission is lacking a ChangeLog, > but I'll write it up for you. If you're looking to contribute more > regularly, you might want to review the contribution checklist[1]. > > Siddhesh > > [1] https://sourceware.org/glibc/wiki/Contribution%20checklist > >> >> Regards, >> Tim >> >> >> diff --git a/libio/wfileops.c b/libio/wfileops.c >> index f123add..4b8fda9 100644 >> --- a/libio/wfileops.c >> +++ b/libio/wfileops.c >> @@ -711,6 +711,7 @@ do_ftell_wide (_IO_FILE *fp) >> return WEOF; >> >> offset += outstop - out; >> + free(out); >> } >> >> /* We don't trust _IO_read_end to represent the current file offset
On 11/09/14 09:05, Siddhesh Poyarekar wrote: > On Wed, Sep 10, 2014 at 10:21:23PM +0200, Tim Lammens wrote: >> Hi, >> >> Here is a patch to fix the memory leak in libio/wfileops.c. > > Thanks, I'll push this fix. Your submission is lacking a ChangeLog, > but I'll write it up for you. If you're looking to contribute more > regularly, you might want to review the contribution checklist[1]. > > Siddhesh > > [1] https://sourceware.org/glibc/wiki/Contribution%20checklist > Do we also need to free this in the error case directly above? >> >> >> diff --git a/libio/wfileops.c b/libio/wfileops.c >> index f123add..4b8fda9 100644 >> --- a/libio/wfileops.c >> +++ b/libio/wfileops.c >> @@ -711,6 +711,7 @@ do_ftell_wide (_IO_FILE *fp) >> return WEOF; >> >> offset += outstop - out; >> + free(out); >> } >> >> /* We don't trust _IO_read_end to represent the current file offset
diff --git a/libio/wfileops.c b/libio/wfileops.c index f123add..4b8fda9 100644 --- a/libio/wfileops.c +++ b/libio/wfileops.c @@ -711,6 +711,7 @@ do_ftell_wide (_IO_FILE *fp) return WEOF; offset += outstop - out; + free(out); } /* We don't trust _IO_read_end to represent the current file offset