summaryrefslogtreecommitdiffstats
path: root/src/strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings.c')
-rw-r--r--src/strings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/strings.c b/src/strings.c
index baa433f..9df1c49 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -7,7 +7,7 @@
// new String pointers must be zeroed before being handed to this function
void init_string(struct String *str, size_t initial_capacity)
{
- if (str->data) free(str->data);
+ free(str->data);
str->data = malloc(initial_capacity);
if (str->data == NULL) {
perror("malloc() failed");