projects
/
krb5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd603d2
)
use strdup
author
Ken Raeburn
<raeburn@mit.edu>
Sat, 28 Oct 2006 03:02:38 +0000
(
03:02
+0000)
committer
Ken Raeburn
<raeburn@mit.edu>
Sat, 28 Oct 2006 03:02:38 +0000
(
03:02
+0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18747
dc483132
-0cff-0310-8789-
dd5450dbe970
src/util/profile/prof_get.c
patch
|
blob
|
history
diff --git
a/src/util/profile/prof_get.c
b/src/util/profile/prof_get.c
index 08fac7f06f5c797a3875d11d27e43a59a337009e..c79500215f1c50f2a5e888fb69fec74a949af464 100644
(file)
--- a/
src/util/profile/prof_get.c
+++ b/
src/util/profile/prof_get.c
@@
-431,16
+431,15
@@
profile_iterator(void **iter_p, char **ret_name, char **ret_value)
if (ret_name) {
if (name) {
- *ret_name =
malloc(strlen(name)+1
);
+ *ret_name =
strdup(name
);
if (!*ret_name)
return ENOMEM;
- strcpy(*ret_name, name);
} else
*ret_name = 0;
}
if (ret_value) {
if (value) {
- *ret_value =
malloc(strlen(value)+1
);
+ *ret_value =
strdup(value
);
if (!*ret_value) {
if (ret_name) {
free(*ret_name);
@@
-448,7
+447,6
@@
profile_iterator(void **iter_p, char **ret_name, char **ret_value)
}
return ENOMEM;
}
- strcpy(*ret_value, value);
} else
*ret_value = 0;
}