'strdup' leak - unknown reason

Checking my code for leaks using Instruments, i'm getting one show up that I can't figure out the solution for. It's this:

Malloc 48 bytes Responsible library - libsystem_c.dylib Responsible frame - strdup

I've googled this and a few suggestions tell people just to leave it, but submitting to Apple with a leak seems like a stupid thing to do, so I wanted to see if anybody could tell me more about this, or where it could be coming from?


If your code doesn't use strdup() directly, then there are basically two possible reasons for the memory leak to be shown:

  1. Apple's code has a bug: it calls strdup() but doesn't free its return value after use.
  2. The debugging tool (Instruments or a command line tool called by it?) you're using falsely detects the memory leak.

In both case, you can file a bug report to Apple.

Need Your Help

BN_hex2bn magically segfaults in openSSL

c++ encryption openssl rsa bignum

Greetings, this is my first post on stackoverflow, and i'm sorry if its a bit long.