mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-10 16:30:50 +00:00
If str(n)dup fails, there is no more memory left. We should exit with
"Out of memory". Patch from Andre Prendel. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5661 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
0bc948ca6a
commit
c1a066a307
2 files changed
+11
No files matched your search
@@ -53,6 +53,9 @@ static int sensors_parse(void)
|
||||
locale = setlocale(LC_ALL, NULL);
|
||||
if (locale) {
|
||||
locale = strdup(locale);
|
||||
if (!locale)
|
||||
sensors_fatal_error(__func__, "Out of memory");
|
||||
|
||||
setlocale(LC_ALL, "C");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user