Comment 5 for bug 2012119

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thank you for taking the time to file a bug report.

I did some investigation and noticed that the problem is actually with imageinfo.

From imageinfo.c:

  filename = poptGetArg(poptctxt);
  if (poptGetArg(poptctxt) != NULL) {
    fprintf(stderr, "imageinfo: must specify a single filename\n");
    poptFreeContext(poptctxt);
    exit(2);
  }
  poptFreeContext(poptctxt);
  if (!filename) {
    fprintf(stderr, "imageinfo: must specify a filename\n");
    exit(3);
  }

This excerpt is saving a pointer to the the "filename" string that's found inside "poptctxt", but then it calls "poptFreeContext", which will invoke "free" on that same string.