aboutsummaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/utility.c b/utility.c
index 42b8dc1e9..571d1f5e2 100644
--- a/utility.c
+++ b/utility.c
@@ -1364,7 +1364,8 @@ extern pid_t* findPidByName( char* pidName)
pidList[i++]=strtol(next->d_name, NULL, 0);
}
}
- pidList[i]=0;
+ if (pidList!=NULL)
+ pidList[i]=0;
return pidList;
}
#endif /* BB_FEATURE_USE_DEVPS_PATCH */