diff options
-rw-r--r-- | nss/common.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nss/common.h b/nss/common.h index 377903b..3d2de88 100644 --- a/nss/common.h +++ b/nss/common.h @@ -175,6 +175,13 @@ TFILE *nslcd_client_open(void) /* check that we have a valid buffer */ \ if ((buffer==NULL)||(buflen<=0)) \ { \ + /* close stream */ \ + if (fp!=NULL) \ + { \ + (void)tio_close(fp); \ + fp=NULL; \ + } \ + /* indicate error */ \ *errnop=EINVAL; \ return NSS_STATUS_UNAVAIL; \ } \ |