diff options
Diffstat (limited to 'udev/udev_utils_string.c')
-rw-r--r-- | udev/udev_utils_string.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/udev/udev_utils_string.c b/udev/udev_utils_string.c index 78bfca800c..3bfe22c815 100644 --- a/udev/udev_utils_string.c +++ b/udev/udev_utils_string.c @@ -46,6 +46,8 @@ void remove_trailing_chars(char *path, char c) { size_t len; + if (path == NULL) + return; len = strlen(path); while (len > 0 && path[len-1] == c) path[--len] = '\0'; |