[Stgt-devel] vtl patch.
Ming Zhang
blackmagic02881
Thu Apr 5 03:30:00 CEST 2007
On Thu, 2007-04-05 at 09:56 +1000, Mark Harvey wrote:
> +ssc3_init(struct scsi_lu *lu) {
> + struct ssc_info * ssc_info;
> +
> + dprintf("Tape device Init() called, path : %s",
> + lu->path);
> + ssc_info = zalloc(sizeof(struct ssc_info));
> + if(! ssc_info)
> + return -ENOMEM;
> + ssc_info->phy = zalloc(sizeof(struct physicalAttributes));
> + if(! ssc_info->phy)
> + return -ENOMEM;
> + ssc_info->media = zalloc(sizeof(struct mediaInDrive));
> + if(! ssc_info->media)
> + return -ENOMEM;
> + ssc_info->logPg = zalloc(sizeof(struct driveLogPage));
> + if(! ssc_info->logPg)
> + return -ENOMEM;
> +
same memory leak here.
More information about the stgt
mailing list