aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-07-22 09:56:34 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-07-22 09:56:49 +0200
commit428a845b20fbee78925aa162c26ec4719a7aac0f (patch)
tree0c55155d2ebc0fc7008ff3fc95c1d55ff516f94f
parentdffc329bb6746c16e580497dda5996ab6e3c9712 (diff)
downloadfref-428a845b20fbee78925aa162c26ec4719a7aac0f.tar.gz
Allocate correct size for fs
-rw-r--r--fref.lex2
1 files changed, 1 insertions, 1 deletions
diff --git a/fref.lex b/fref.lex
index 2eaa19d..ddfa71d 100644
--- a/fref.lex
+++ b/fref.lex
@@ -295,7 +295,7 @@ pf(char *fmt, ...)
if(*p == '%' || *p == '*')
n++;
- if(!(fs = malloc(n)))
+ if(!(fs = malloc(sizeof(char *)*n)))
err(1, "malloc");
/*