Skip to content

Commit baa48a8

Browse files
authored
Merge pull request #69 from calebccff/ppps-segfault
ppps: check if ppps3_path is valid
2 parents d678216 + 98b4aa8 commit baa48a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ppps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void ppps_power(struct device *dev, bool on)
7979
dev->ppps_path = temp;
8080
}
8181

82-
if (dev->ppps3_path[0] != '/') {
82+
if (dev->ppps3_path && dev->ppps3_path[0] != '/') {
8383
char *temp;
8484

8585
asprintf(&temp, PPPS_BASE_PATH, dev->ppps3_path);

0 commit comments

Comments
 (0)