We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b11ff3d commit edd7e7cCopy full SHA for edd7e7c
mysys/my_lib.c
@@ -1,4 +1,5 @@
1
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
2
+ Copyright (c) 2008, 2020, MariaDB Corporation.
3
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
@@ -183,7 +184,8 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
183
184
my_errno=errno;
185
if (dirp)
186
(void) closedir(dirp);
- my_dirend(&dirh->dir);
187
+ if (dirh)
188
+ my_dirend(&dirh->dir);
189
if (MyFlags & (MY_FAE | MY_WME))
190
my_error(EE_DIR, MYF(ME_BELL | ME_WAITTANG), path, my_errno);
191
DBUG_RETURN(NULL);
0 commit comments