correctly initialize error_code
This commit is contained in:
@@ -276,7 +276,7 @@ METHOD(pts_t, is_path_valid, bool, private_pts_t *this, char *path,
|
|||||||
int error;
|
int error;
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
|
|
||||||
error_code = NULL;
|
*error_code = 0;
|
||||||
error = stat(path, &sb);
|
error = stat(path, &sb);
|
||||||
if (error == 0)
|
if (error == 0)
|
||||||
{
|
{
|
||||||
@@ -294,7 +294,8 @@ METHOD(pts_t, is_path_valid, bool, private_pts_t *this, char *path,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DBG1(DBG_IMC, "error: %s occured while validating path: %s", strerror(error), path);
|
DBG1(DBG_IMC, "error: %s occured while validating path: %s",
|
||||||
|
strerror(error), path);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user