diff options
| author | jdolecek <jdolecek@NetBSD.org> | 2018-10-14 17:37:40 +0000 |
|---|---|---|
| committer | jdolecek <jdolecek@NetBSD.org> | 2018-10-14 17:37:40 +0000 |
| commit | 1df1fda95b3fbbe5d2a49a1fcd1bfefbaeba6508 (patch) | |
| tree | d3b8a07267c11ccace1f91a11ac42924d928e87e /common | |
| parent | 27499c264f7ca51323ac65fa859a9287025ca4d4 (diff) | |
remove M_CANFAIL flag for malloc(9) - it was completely ignored, so had
actually no effect
Diffstat (limited to 'common')
| -rw-r--r-- | common/lib/libprop/prop_kern.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/common/lib/libprop/prop_kern.c b/common/lib/libprop/prop_kern.c index cd09a669eb7..fa35842d336 100644 --- a/common/lib/libprop/prop_kern.c +++ b/common/lib/libprop/prop_kern.c @@ -1,4 +1,4 @@ -/* $NetBSD: prop_kern.c,v 1.23 2017/01/29 02:29:06 christos Exp $ */ +/* $NetBSD: prop_kern.c,v 1.24 2018/10/14 17:37:40 jdolecek Exp $ */ /*- * Copyright (c) 2006, 2009 The NetBSD Foundation, Inc. @@ -412,10 +412,8 @@ _prop_object_copyin(const struct plistref *pref, const prop_type_t type, /* * Allocate an extra byte so we can guarantee NUL-termination. - * - * Allow malloc to fail in case pmap would be exhausted. */ - buf = malloc(pref->pref_len + 1, M_TEMP, M_WAITOK | M_CANFAIL); + buf = malloc(pref->pref_len + 1, M_TEMP, M_WAITOK); if (buf == NULL) return (ENOMEM); error = copyin(pref->pref_plist, buf, pref->pref_len); |
