From f4a8d4f4e4cfdb9693ba1d7d7c6881b2826418a9 Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 30 Apr 1998 13:15:31 +0000 Subject: [PATCH] Return -1 for invalid descriptor in catclose --- lib/libc/nls/msgcat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c index 8f53e30a855..b6ac8aa3b20 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) { -- 2.45.2