apps/examples/userfs:  Add some (unnecessary) checks for NULL pointers.
@@ -251,8 +251,12 @@ static int ufstest_open(FAR void *volinfo, FAR const char *relpath,
}
static int ufstest_close(FAR void *volinfo, FAR void *openinfo)
+{
+ if (openinfo != NULL)
{
free(openinfo);
+ }
+
return OK;
}
@@ -404,8 +408,12 @@ static int ufstest_opendir(FAR void *volinfo, FAR const char *relpath,
}
static int ufstest_closedir(FAR void *volinfo, FAR void *dir)
+{
+ if (dir != NULL)
{
free(dir);
+ }
+
return OK;
}
