google / google-authenticator-libpam

Apache License 2.0
1.77k stars 281 forks source link

Memory Leak #133

Closed QiAnXinCodeSafe closed 5 years ago

QiAnXinCodeSafe commented 5 years ago

in line 126: https://github.com/google/google-authenticator-libpam/blob/842142d52328baa6076826428fe040db98aab82a/src/base32_prog.c#L126

Memory is allocated, but never freed at the end of function.

ThomasHabets commented 5 years ago

Yeah. The function is main, so it doesn't really matter. I assume this is found by a tool?

  1. Maybe this tool should ignore main?
  2. This tool failed to find the equivalent "leak" under mode == DECODE_STRING