diff options
author | ache <ache@FreeBSD.org> | 1998-04-30 13:15:31 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1998-04-30 13:15:31 +0000 |
commit | f4a8d4f4e4cfdb9693ba1d7d7c6881b2826418a9 (patch) | |
tree | 61704341e77b5585664fb8bd347ada57dd8bfb0e | |
parent | 2c460ce94bc23aebcaaac2920ff7788a29ba31f5 (diff) | |
download | FreeBSD-src-f4a8d4f4e4cfdb9693ba1d7d7c6881b2826418a9.zip FreeBSD-src-f4a8d4f4e4cfdb9693ba1d7d7c6881b2826418a9.tar.gz |
Return -1 for invalid descriptor in catclose
-rw-r--r-- | lib/libc/nls/msgcat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c index 8f53e30..b6ac8aa 100644 --- a/lib/libc/nls/msgcat.c +++ b/lib/libc/nls/msgcat.c @@ -1,4 +1,4 @@ -/* $Id: msgcat.c,v 1.15 1998/04/30 11:39:08 ache Exp $ */ +/* $Id: msgcat.c,v 1.16 1998/04/30 12:25:05 ache Exp $ */ /*********************************************************** Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts. @@ -273,7 +273,7 @@ nl_catd catd; MCSetT *set; int i; - if (!cat) return -1; + if (catd == NULL || catd == NLERR) return -1; if (cat->loadType != MCLoadAll) close(cat->fd); for (i = 0; i < cat->numSets; ++i) { |