[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gluster-devel] Unchecked mallocs in libglusterfs
From: |
Jonathan Bringhurst |
Subject: |
[Gluster-devel] Unchecked mallocs in libglusterfs |
Date: |
Mon, 31 Dec 2007 17:38:13 -0500 |
Hey everyone,
This is my first time posting to the list and (as a disclaimer) I'm
generally a newbie to glusterfs and filesystems in general. I was
recently poking through the source (in the glusterfs-1.3.7 tarball)
and noticed a few unchecked mallocs. Here's a few examples...
**************************************
libglusterfs/src/common-utils.h:105
struct iovec *newvec = malloc (bytecount);
for (i=0;i<count;i++) {
newvec[i].iov_len = vector[i].iov_len;
**************************************
libglusterfs/src/common-utils.h:169
void *newptr = malloc (size);
memcpy (newptr, ptr, size);
Is there any plan in place to get these cleaned up? I'd be happy to
create a nice diff, I'm just unsure as how to proceed. Are there
syscall wrappers located somewhere in the code base? Should I change
them to x*alloc? Any suggestions on the matter would be appreciated.
-Jon Bringhurst <address@hidden>
P.S. My current motivation on this is to become more familiar with the
codebase in general before I attempt to implement my (super secret)
idea for a translator ;)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gluster-devel] Unchecked mallocs in libglusterfs,
Jonathan Bringhurst <=