memory leak with mu_rfc2047_encode

Henrique Pantarotto <[email protected]>
Newsgroups gmane.comp.gnu.mailutils.bugs
Message-ID <0100015a477de5f5-e5f4a8f1-3fa5-4a97-8c66-188db7a795df-000000@email.amazonses.com>
Hello friends!

One of my programs is presenting large memory usage, and I traced it down
to the mu_rfc2047_encode function that I'm using.

If you compile and run the program below, it will use all of your memory.

--start--
#include <stdio.h>
#include "mailutils/mailutils.h"

void main() {

  char *value;

  while(1) {
    mu_rfc2047_encode("utf-8", "quoted-printable", "Any subject", &value);
    printf("Result: %s\n", value);
    if (value)
      free(value);
  }

}
--end--

I've tested this with the default "libmailutils-dev" (1:2.99.98-2) package
from Debian 8.7, but I've also tested with mailutils-3.1.1.

Perhaps I'm not using this function properly?

Thanks!

_______________________________________________
Bug-mailutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-mailutils
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.