Message ID | 20190912210509.19816-3-mhei@heimpold.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Various fixes for mmc-utils | expand |
diff --git a/lsmmc.c b/lsmmc.c index e514c83..a53bc57 100644 --- a/lsmmc.c +++ b/lsmmc.c @@ -378,8 +378,10 @@ char *to_binstr(char *hexstr) return NULL; while (hexstr && *hexstr != '\0') { - if (!isxdigit(*hexstr)) + if (!isxdigit(*hexstr)) { + free(binstr); return NULL; + } if (isdigit(*hexstr)) strcat(binstr, bindigits[*hexstr - '0']);