summaryrefslogtreecommitdiffstats
path: root/sockutil.c
diff options
context:
space:
mode:
authorDean Jansa <djansa@redhat.com>2008-08-22 21:04:16 +0000
committerNathan Straz <nstraz@redhat.com>2008-09-23 09:37:47 -0400
commitf6da9f58ab06baee5f0d521f1c64a6982546c560 (patch)
tree21f0184599d156b68aa800d2889f204b3baafad9 /sockutil.c
parent54cc78586aec14c714060c2d64837cfe54fdc9eb (diff)
downloadqarsh-f6da9f58ab06baee5f0d521f1c64a6982546c560.tar.gz
qarsh-f6da9f58ab06baee5f0d521f1c64a6982546c560.tar.xz
qarsh-f6da9f58ab06baee5f0d521f1c64a6982546c560.zip
Plug some memory leaks
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);