diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-09-26 16:09:28 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-09-26 16:09:28 +0000 |
commit | cfaa13714df367aff51031e23cf7bc52aac393f9 (patch) | |
tree | 6d29476735be4553bcee3e8ea6378e2db9e8aa06 /usr.sbin/wsmoused | |
parent | 270598dd720114cfb5f8d54e867679aee352f32e (diff) |
check strdup failure; ok anil millert
Diffstat (limited to 'usr.sbin/wsmoused')
-rw-r--r-- | usr.sbin/wsmoused/wsmoused.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/wsmoused/wsmoused.c b/usr.sbin/wsmoused/wsmoused.c index 453c6bc24c3..ae01a593765 100644 --- a/usr.sbin/wsmoused/wsmoused.c +++ b/usr.sbin/wsmoused/wsmoused.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsmoused.c,v 1.14 2003/04/13 11:20:47 jmc Exp $ */ +/* $OpenBSD: wsmoused.c,v 1.15 2003/09/26 16:09:27 deraadt Exp $ */ /* * Copyright (c) 2001 Jean-Baptiste Marchand, Julien Montagne and Jerome Verdon @@ -521,7 +521,8 @@ main(int argc, char **argv) identify = TRUE; break; case 'p': - mouse.portname = strdup(optarg); + if ((mouse.portname = strdup(optarg)) == NULL) + logerr(1, "out of memory"); break; case 't': if (strcmp(optarg, "auto") == 0) { |