summaryrefslogtreecommitdiff
path: root/xs_encdec.h
diff options
context:
space:
mode:
Diffstat (limited to 'xs_encdec.h')
-rw-r--r--xs_encdec.h6
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)
50 int i; 50 int i;
51 if (sscanf(&hex[n], "%02x", &i) == 0) { 51 if (sscanf(&hex[n], "%02x", &i) == 0) {
52 /* decoding error */ 52 /* decoding error */
53 free(s); 53 return xs_free(s);
54 return NULL;
55 } 54 }
56 else 55 else
57 *p = i; 56 *p = i;
@@ -137,8 +136,7 @@ d_char *xs_base64_dec(const char *data, int *size)
137 136
138 if (ss == NULL) { 137 if (ss == NULL) {
139 /* not a base64 char */ 138 /* not a base64 char */
140 free(s); 139 return xs_free(s);
141 return NULL;
142 } 140 }
143 141
144 cs[n] = ss - b64_tbl; 142 cs[n] = ss - b64_tbl;