summaryrefslogtreecommitdiff
path: root/kicad/sexpr.c
diff options
context:
space:
mode:
Diffstat (limited to 'kicad/sexpr.c')
-rw-r--r--kicad/sexpr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kicad/sexpr.c b/kicad/sexpr.c
index 0727891..6f0fd2f 100644
--- a/kicad/sexpr.c
+++ b/kicad/sexpr.c
@@ -83,9 +83,7 @@ static void add_string(struct sexpr_ctx *ctx, const char *end)
if (!new)
return;
- e->s = realloc(e->s, old + new + 1);
- if (!e->s)
- diag_pfatal("realloc");
+ e->s = realloc_size(e->s, old + new + 1);
memcpy(e->s + old, ctx->p, new);
e->s[old + new] = 0;
}