diff options
Diffstat (limited to 'usr.sbin/apmd/apmd.c')
-rw-r--r-- | usr.sbin/apmd/apmd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c index 2ebd5572..470bcc6 100644 --- a/usr.sbin/apmd/apmd.c +++ b/usr.sbin/apmd/apmd.c @@ -139,7 +139,8 @@ event_cmd_exec_clone(void *this) newone->evcmd.len = oldone->evcmd.len; newone->evcmd.name = oldone->evcmd.name; newone->evcmd.op = oldone->evcmd.op; - newone->line = strdup(oldone->line); + if ((newone->line = strdup(oldone->line)) == NULL) + err(1, "out of memory"); return (struct event_cmd *) newone; } void |