mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-15 17:47:09 +00:00
Merge pull request #83 from troxor/disk-by-label
Fix segfault on invalid label
This commit is contained in:
commit
9c833665d8
@ -72,7 +72,9 @@ struct diskio_stat *prepare_diskio_stat(const char *s)
|
||||
|
||||
char * rpbuf;
|
||||
rpbuf = realpath(&device_name[0], NULL);
|
||||
strncpy(&device_s[0], rpbuf, text_buffer_size.get(*state));
|
||||
if (rpbuf) {
|
||||
strncpy(&device_s[0], rpbuf, text_buffer_size.get(*state));
|
||||
}
|
||||
free(rpbuf);
|
||||
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user