aboutsummaryrefslogtreecommitdiffstats
path: root/UsersTable.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:01:07 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:01:07 +0200
commitff9409b1737627857eb47f64f536a3f66b6a09a4 (patch)
tree61b631ba551e68a4f656b8b76ff7bd0d9955fc64 /UsersTable.c
parentf75ab6d2c11e8a8e18191b087564aedebbeb96c5 (diff)
downloaddebian_htop-ff9409b1737627857eb47f64f536a3f66b6a09a4.tar.gz
debian_htop-ff9409b1737627857eb47f64f536a3f66b6a09a4.tar.bz2
debian_htop-ff9409b1737627857eb47f64f536a3f66b6a09a4.zip
Imported Upstream version 2.0.0upstream/2.0.0
Diffstat (limited to 'UsersTable.c')
-rw-r--r--UsersTable.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/UsersTable.c b/UsersTable.c
index ecabb0a..f383256 100644
--- a/UsersTable.c
+++ b/UsersTable.c
@@ -6,6 +6,7 @@ in the source distribution for its full text.
*/
#include "UsersTable.h"
+#include "XAlloc.h"
#include "config.h"
@@ -27,7 +28,7 @@ typedef struct UsersTable_ {
UsersTable* UsersTable_new() {
UsersTable* this;
- this = malloc(sizeof(UsersTable));
+ this = xMalloc(sizeof(UsersTable));
this->users = Hashtable_new(20, true);
return this;
}
@@ -42,7 +43,7 @@ char* UsersTable_getRef(UsersTable* this, unsigned int uid) {
if (name == NULL) {
struct passwd* userData = getpwuid(uid);
if (userData != NULL) {
- name = strdup(userData->pw_name);
+ name = xStrdup(userData->pw_name);
Hashtable_put(this->users, uid, name);
}
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy