summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-01-04 13:30:14 +0200
committerPanu Matilainen <pmatilai@redhat.com>2010-01-04 13:30:14 +0200
commit05dcdf44d03d6a953d1e5aa15de3269a582ff9f2 (patch)
treed4a20b7703c05e14a88fe4e8260f1bcf6ce78849 /misc
parentf895acd285366cf58cc3c97b5f188fecbfd782a8 (diff)
downloadlibrpm-tizen-05dcdf44d03d6a953d1e5aa15de3269a582ff9f2.tar.gz
librpm-tizen-05dcdf44d03d6a953d1e5aa15de3269a582ff9f2.tar.bz2
librpm-tizen-05dcdf44d03d6a953d1e5aa15de3269a582ff9f2.zip
Use rpm's own strdup() clone everywhere
Diffstat (limited to 'misc')
-rw-r--r--misc/getmntent.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/misc/getmntent.c b/misc/getmntent.c
index 47db9962b..ae120c772 100644
--- a/misc/getmntent.c
+++ b/misc/getmntent.c
@@ -1,5 +1,7 @@
#include "system.h"
+#include <rpm/rpmutil.h>
+
#ifdef __aix__
#define COMMENTCHAR '*'
#else
@@ -41,7 +43,7 @@ our_mntent *getmntent(FILE *filep) {
start = chptr;
while (*chptr != ':') chptr++;
*chptr = '\0';
- item.mnt_dir = strdup(start);
+ item.mnt_dir = rstrdup(start);
return &item;
}
# else
@@ -55,7 +57,7 @@ our_mntent *getmntent(FILE *filep) {
while (!isspace(*chptr) && (*chptr)) chptr++;
*chptr = '\0';
- item.our_mntdir = strdup(start);
+ item.our_mntdir = rstrdup(start);
return &item;
# endif
}