summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sp_utils.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c
index 6612e6c..6e39b0a 100644
--- a/src/sp_utils.c
+++ b/src/sp_utils.c
@@ -284,9 +284,8 @@ bool sp_match_array_key(const zval* zv, const char* to_match, const pcre* rx) {
284 return true; 284 return true;
285 } 285 }
286 } else { 286 } else {
287 char* idx_str = emalloc(snprintf(NULL, 0, "%lu", idx) + 1); 287 char* idx_str = NULL;
288 288 spprintf(&idx_str, 0, "%lu", idx);
289 sprintf(idx_str, "%lu", idx); // This could use a log.
290 if (sp_match_value(idx_str, to_match, rx)) { 289 if (sp_match_value(idx_str, to_match, rx)) {
291 efree(idx_str); 290 efree(idx_str);
292 return true; 291 return true;