summaryrefslogtreecommitdiff
path: root/cifs.upcall.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2010-02-07 10:58:52 -0500
committerJeff Layton <jlayton@redhat.com>2010-02-07 10:58:52 -0500
commit07c16b71c796c6737e8f8e9b2d9d34caabba1d92 (patch)
tree3925d7cb05e3fc2a6d528a112d410d54b9c7a6f4 /cifs.upcall.c
parent97dd3e51fa2a375963fd675de8610ca653d449ce (diff)
downloadcifs-utils-07c16b71c796c6737e8f8e9b2d9d34caabba1d92.tar.gz
cifs-utils-07c16b71c796c6737e8f8e9b2d9d34caabba1d92.tar.bz2
cifs-utils-07c16b71c796c6737e8f8e9b2d9d34caabba1d92.zip
cifs.upcall: replace SMB_XMALLOC_ARRAY with calloc
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'cifs.upcall.c')
-rw-r--r--cifs.upcall.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cifs.upcall.c b/cifs.upcall.c
index 7657fde..3e85ad5 100644
--- a/cifs.upcall.c
+++ b/cifs.upcall.c
@@ -408,7 +408,7 @@ decode_key_description(const char *desc, struct decoded_args *arg)
len -= 4;
SAFE_FREE(arg->hostname);
- arg->hostname = SMB_XMALLOC_ARRAY(char, len);
+ arg->hostname = calloc(sizeof(char), len);
strlcpy(arg->hostname, tkn + 5, len);
retval |= DKD_HAVE_HOSTNAME;
} else if (!strncmp(tkn, "ip4=", 4) ||
@@ -420,7 +420,7 @@ decode_key_description(const char *desc, struct decoded_args *arg)
len -= 3;
SAFE_FREE(arg->ip);
- arg->ip = SMB_XMALLOC_ARRAY(char, len);
+ arg->ip = calloc(sizeof(char), len);
strlcpy(arg->ip, tkn + 4, len);
retval |= DKD_HAVE_IP;
} else if (strncmp(tkn, "pid=", 4) == 0) {
@@ -690,7 +690,7 @@ int main(const int argc, char *const argv[])
retry_new_hostname:
/* for "cifs/" service name + terminating 0 */
datalen = strlen(host) + 5 + 1;
- princ = SMB_XMALLOC_ARRAY(char, datalen);
+ princ = calloc(sizeof(char), datalen);
if (!princ) {
rc = -ENOMEM;
break;
@@ -741,7 +741,7 @@ retry_new_hostname:
/* pack SecurityBLob and SessionKey into downcall packet */
datalen =
sizeof(struct cifs_spnego_msg) + secblob.length + sess_key.length;
- keydata = (struct cifs_spnego_msg*)SMB_XMALLOC_ARRAY(char, datalen);
+ keydata = (struct cifs_spnego_msg*) calloc(sizeof(char), datalen);
if (!keydata) {
rc = 1;
goto out;