|
@@ -138,6 +138,9 @@ struct strlist *probe_file__get_rawlist(int fd)
|
|
char *p;
|
|
char *p;
|
|
struct strlist *sl;
|
|
struct strlist *sl;
|
|
|
|
|
|
|
|
+ if (fd < 0)
|
|
|
|
+ return NULL;
|
|
|
|
+
|
|
sl = strlist__new(NULL, NULL);
|
|
sl = strlist__new(NULL, NULL);
|
|
|
|
|
|
fp = fdopen(dup(fd), "r");
|
|
fp = fdopen(dup(fd), "r");
|
|
@@ -271,6 +274,9 @@ int probe_file__get_events(int fd, struct strfilter *filter,
|
|
const char *p;
|
|
const char *p;
|
|
int ret = -ENOENT;
|
|
int ret = -ENOENT;
|
|
|
|
|
|
|
|
+ if (!plist)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
namelist = __probe_file__get_namelist(fd, true);
|
|
namelist = __probe_file__get_namelist(fd, true);
|
|
if (!namelist)
|
|
if (!namelist)
|
|
return -ENOENT;
|
|
return -ENOENT;
|