diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/core/str.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/core/str.c b/src/lib/core/str.c index d774e72..6457afe 100644 --- a/src/lib/core/str.c +++ b/src/lib/core/str.c @@ -526,7 +526,7 @@ char *normalize_space(char *s) { return NULL; } - if ((tmp = calloc(strlen(s) + 1, sizeof(char))) == NULL) { + if (!(tmp = strdup(s))) { perror("could not allocate memory for temporary string"); return NULL; } |