... | ... |
@@ -2029,6 +2029,7 @@ static char *decodehexstr(const char *hex, unsigned int *dlen) |
2029 | 2029 |
|
2030 | 2030 |
decoded = calloc(len + 1 + wildcard * 32, sizeof(char)); |
2031 | 2031 |
if(!decoded) { |
2032 |
+ free(str16); |
|
2032 | 2033 |
mprintf("!decodehexstr: Can't allocate memory for decoded\n"); |
2033 | 2034 |
return NULL; |
2034 | 2035 |
} |
... | ... |
@@ -2051,6 +2052,7 @@ static char *decodehexstr(const char *hex, unsigned int *dlen) |
2051 | 2051 |
default: |
2052 | 2052 |
mprintf("!decodehexstr: Unknown wildcard (0x%x@%u)\n", str16[i] & CLI_MATCH_WILDCARD, i); |
2053 | 2053 |
free(decoded); |
2054 |
+ free(str16); |
|
2054 | 2055 |
return NULL; |
2055 | 2056 |
} |
2056 | 2057 |
} else { |
... | ... |
@@ -2061,7 +2063,7 @@ static char *decodehexstr(const char *hex, unsigned int *dlen) |
2061 | 2061 |
|
2062 | 2062 |
if(dlen) |
2063 | 2063 |
*dlen = p; |
2064 |
- |
|
2064 |
+ free(str16); |
|
2065 | 2065 |
return decoded; |
2066 | 2066 |
} |
2067 | 2067 |
|