returning a const char * instead of a char * will lead to
trouble if the string is then tried to be free()'d.
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1056
7f574dfc-610e-0410-a909-
a81674777703
2008-03-29
* Increased C99 compliance.
+ * Fixed potential segfault in get_ioscheduler().
2008-03-28
* Fixed messed up percentages (fs_free_perc, fs_used_perc, mpd_percent,
char buf[128];
if (!disk)
- return "n/a";
+ return strdup("n/a");
snprintf(buf, 127, "/sys/block/%s/queue/scheduler", disk);
if ((fp = fopen(buf, "r")) == NULL) {