diff options
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r-- | source/smbd/reply.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c index b13563182c9..ad317caac93 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -1285,6 +1285,11 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size { CVAL(outbuf,smb_rcls) = ERRDOS; SSVAL(outbuf,smb_err,ERRnofiles); + if(dptr_num != -1) + { + dptr_close(dptr_num); + dptr_num = -1; + } } /* If we were called as SMBffirst with smb_search_id == NULL @@ -1297,6 +1302,7 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size SSVAL(outbuf,smb_err,ERRnofiles); /* Also close the dptr - we know it's gone */ dptr_close(dptr_num); + dptr_num = -1; } /* If we were called as SMBfunique, then we can close the dirptr now ! */ |