[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] memleak in digestauth.c @ check_argument_match()

From: Andreas Wehrmann
Subject: [libmicrohttpd] memleak in digestauth.c @ check_argument_match()
Date: Thu, 04 Jun 2015 13:22:15 +0200


I was checking a test app in valgrind and much to my surprise it was 
complaining about a memleak in libmicrohttpd.
In check_argument_match() a buffer is allocated using strdup() but freed 

I wouldn't have noticed this leak if it wasn't for valgrind because if a URI is 
requested without any arguments (my usual case)
the buffer that gets allocated has 'only' a length of 1 byte, thus memory usage 
will build up very slowly over time.

The patch attached fixes it.
Btw. the indentation of that file is a mess, tabs and spaces are mixed :-|


Attachment: digestauth-memleak.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]