drop strndup

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24537 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2009-01-30 16:45:51 +00:00
parent d3dcb320e6
commit 25eaa03e53

View File

@@ -419,10 +419,12 @@ find_func(krb5_context context, const char *name)
p = strchr(name, ':');
if (p) {
size_t len = p - name + 1;
func = p + 1;
module = strndup(name, p - name);
module = malloc(len);
if (module == NULL)
return NULL;
strlcpy(module, name, len);
} else
func = name;