diff options
author | default <nobody@localhost> | 2022-10-25 09:32:41 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2022-10-25 09:32:41 +0200 |
commit | fa870ab358ce94017228cdddf4697e041fc32531 (patch) | |
tree | 326d5a13a525531b4c5c243160d215d7c28263ae /xs_encdec.h | |
parent | d2095105de3fe8c3397df7d46a9d61011b74c09e (diff) |
Backport from xs.
Diffstat (limited to 'xs_encdec.h')
-rw-r--r-- | xs_encdec.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xs_encdec.h b/xs_encdec.h index b093eca..334f995 100644 --- a/xs_encdec.h +++ b/xs_encdec.h @@ -50,8 +50,7 @@ d_char *xs_hex_dec(const char *hex, int *size) int i; if (sscanf(&hex[n], "%02x", &i) == 0) { /* decoding error */ - free(s); - return NULL; + return xs_free(s); } else *p = i; @@ -137,8 +136,7 @@ d_char *xs_base64_dec(const char *data, int *size) if (ss == NULL) { /* not a base64 char */ - free(s); - return NULL; + return xs_free(s); } cs[n] = ss - b64_tbl; |