summaryrefslogtreecommitdiffstats
path: root/sockutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'sockutil.c')
-rw-r--r--sockutil.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sockutil.c b/sockutil.c
index db22f67..9394781 100644
--- a/sockutil.c
+++ b/sockutil.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2005,2006 Red Hat, Inc. All rights reserved.
+ * Copyright © 2005,20068 Red Hat, Inc. All rights reserved.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions of the
@@ -143,9 +143,7 @@ send_packet(int fd, struct qa_packet *qp)
char *packetbuf;
int packetsize;
ssize_t ret;
-
- packetbuf = malloc(QARSH_MAX_PACKET_SIZE);
- memset(packetbuf, 0, QARSH_MAX_PACKET_SIZE);
+
packetbuf = qptostr(qp, &packetbuf, &packetsize);
ret = write(fd, packetbuf, packetsize);