From: Ken Raeburn Date: Wed, 4 Jul 2007 04:27:32 +0000 (+0000) Subject: Use strdup X-Git-Tag: krb5-1.7-alpha1~1024 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e0845c95210ca7cf4a03be23b034a2f29fc078c6;p=krb5.git Use strdup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19671 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/generic/util_buffer.c b/src/lib/gssapi/generic/util_buffer.c index 77cb2eb2f..9b814b00a 100644 --- a/src/lib/gssapi/generic/util_buffer.c +++ b/src/lib/gssapi/generic/util_buffer.c @@ -37,12 +37,10 @@ int g_make_string_buffer(str, buffer) { buffer->length = strlen(str); - if ((buffer->value = (void *) xmalloc(buffer->length + 1)) == NULL) { + if ((buffer->value = strdup(str)) == NULL) { buffer->length = 0; return(0); } - strcpy(buffer->value, str); - return(1); }