lkml.org 
[lkml]   [2006]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ PATCH 2.6.16-rc3-xen 3/3] sysfs: export Xen hypervisor attributes to sysfs
> +static ssize_t by_show(struct kobject * kobj,
> + struct attribute * attr,
> + char * page)
> +{
> + int err = 0;
> + struct xen_compile_info * info =
> + kmalloc(sizeof(struct xen_compile_info), GFP_KERNEL);
> + if (info ) {
> + if (0 == HYPERVISOR_xen_version(XENVER_compile_info, info))
> + return sprintf(page, "%s\n", info->compile_by);
> + kfree(info);
> + }
> + return err;
> +}

Looks like you have a memory leak here. There's at least one more of the
same kind in your code.

Heiko
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-22 13:28    [W:0.133 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site