Use asprintf instead of sprintf, use xmalloc instead of malloc.
Return values were allocated dynamically but never freed, this caused memory leaks if authentication functions were called more than once. Made them static, so that they get reallocated at each new invocation of getM functions, thus reclaming lost storage. Made <config.h> the first file to be included and guard it with #ifdef HAVE_CONFIG_H Reindented text to conform to GNU coding style.
Showing
1 changed file
with
109 additions
and
82 deletions
-
Please register or sign in to post a comment