This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/2072] New: memory leak in stdio-common/printf_fp.c


In stdio-common/printf_fp.c there are some locations (handling error  
situations) in function _printf_fp() where the deallocation of memory for  
wbuffer is not handled. E.g. the macros PADN() und outchar() return to caller  
without checking wbuffer. I'm not sure whether this is intentionally done or  
not.  
  
#define outchar(ch)							      \  
  do									      \  
    {									      \  
      register const int outc = (ch);					      \  
      if (putc (outc, fp) == EOF)					      \  
	return -1;							      \  
      ++done;								      \  
    } while (0)  
  
#define PADN(ch, len)							      \  
  do									      \  
    {									      \  
      if (PAD (fp, ch, len) != len)					      \  
	return -1;							      \  
      done += len;							      \  
    }									      \  
  while (0)

-- 
           Summary: memory leak in stdio-common/printf_fp.c
           Product: glibc
           Version: 2.3.6
            Status: NEW
          Severity: minor
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: heiko dot nardmann at secunet dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=2072

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]