diff options
author | Chad Loder <cloder@cvs.openbsd.org> | 2005-04-11 14:59:02 +0000 |
---|---|---|
committer | Chad Loder <cloder@cvs.openbsd.org> | 2005-04-11 14:59:02 +0000 |
commit | bbea701b11944be027a03b0ff429be946b532ef1 (patch) | |
tree | 33b5a41a8009fc6885876bbeb2f4fa4145cd03a4 /sbin/scsi/scsi.c | |
parent | 3008a1241e44a9aaba873734564ecb3779053be8 (diff) |
Check for asprintf failure. From Bruno Rohee (thank you).
Diffstat (limited to 'sbin/scsi/scsi.c')
-rw-r--r-- | sbin/scsi/scsi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/scsi/scsi.c b/sbin/scsi/scsi.c index 434bfac0f3a..e0c2846b0c9 100644 --- a/sbin/scsi/scsi.c +++ b/sbin/scsi/scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi.c,v 1.16 2005/04/09 02:14:32 cloder Exp $ */ +/* $OpenBSD: scsi.c,v 1.17 2005/04/11 14:59:01 cloder Exp $ */ /* $FreeBSD: scsi.c,v 1.11 1996/04/06 11:00:28 joerg Exp $ */ /* @@ -739,7 +739,9 @@ edit_edit(void) fclose(edit_file); - asprintf(&system_line, "%s %s", editor, edit_name); + if (asprintf(&system_line, "%s %s", editor, edit_name) == -1) + err(1, NULL); + system(system_line); free(system_line); |