diff options
author | Renato Botelho <renato@netgate.com> | 2016-07-19 11:28:42 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-07-19 11:28:42 -0300 |
commit | d672f772561b19a87633a38b63c9b6b9ee457a3e (patch) | |
tree | ddb56ff0f93f58cbbbe2e088659df322eeb91960 /usr.bin/mail/vars.c | |
parent | 0a721af42b1b08f07aac9419590a4906d5b1e8f8 (diff) | |
parent | 9a5d5ad86e4479378293a6598ce3e086d8abf1a8 (diff) | |
download | FreeBSD-src-d672f772561b19a87633a38b63c9b6b9ee457a3e.zip FreeBSD-src-d672f772561b19a87633a38b63c9b6b9ee457a3e.tar.gz |
Merge remote-tracking branch 'origin/stable/11' into devel-11
Diffstat (limited to 'usr.bin/mail/vars.c')
-rw-r--r-- | usr.bin/mail/vars.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mail/vars.c b/usr.bin/mail/vars.c index dca0604..f3c6659 100644 --- a/usr.bin/mail/vars.c +++ b/usr.bin/mail/vars.c @@ -56,7 +56,8 @@ assign(const char *name, const char *value) h = hash(name); vp = lookup(name); if (vp == NULL) { - vp = calloc(sizeof(*vp), 1); + if ((vp = calloc(1, sizeof(*vp))) == NULL) + err(1, "Out of memory"); vp->v_name = vcopy(name); vp->v_link = variables[h]; variables[h] = vp; |