diff options
author | Roland McGrath <roland@gnu.org> | 2001-04-01 01:39:47 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2001-04-01 01:39:47 +0000 |
commit | 970c84822bf6483a7d7112005708295d5e67461f (patch) | |
tree | 6d9bb941ef96433c36ed3188cfb5a34ecbcbbef7 /libdiskfs/dir-chg.c | |
parent | f56be46e466ec63a987b1576700ad48388606a49 (diff) | |
download | hurd-970c84822bf6483a7d7112005708295d5e67461f.tar.gz hurd-970c84822bf6483a7d7112005708295d5e67461f.tar.bz2 hurd-970c84822bf6483a7d7112005708295d5e67461f.zip |
2001-03-28 Neal H Walfield <neal@cs.uml.edu>
* dir-chg.c (diskfs_S_dir_notice_changes): Check what malloc
returns.
* peropen-make.c (diskfs_make_peropen): Likewise.
Diffstat (limited to 'libdiskfs/dir-chg.c')
-rw-r--r-- | libdiskfs/dir-chg.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libdiskfs/dir-chg.c b/libdiskfs/dir-chg.c index 16eb26f4..0e2f4c8a 100644 --- a/libdiskfs/dir-chg.c +++ b/libdiskfs/dir-chg.c @@ -1,5 +1,5 @@ /* Notifications of directory changes. - Copyright (C) 1994, 1995, 1998 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1998, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -44,6 +44,11 @@ diskfs_S_dir_notice_changes (struct protid *cred, return err; } req = malloc (sizeof (struct modreq)); + if (! req) + { + mutex_unlock (&np->lock); + return ENOMEM; + } req->port = notify; req->next = np->dirmod_reqs; np->dirmod_reqs = req; |