All of lore.kernel.org
 help / color / mirror / Atom feed
From: phcoder <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Minor leak in scsi.c
Date: Mon, 23 Feb 2009 09:57:59 +0100	[thread overview]
Message-ID: <49A26517.5050106@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 117 bytes --]

Hello. Here is a fix for a leak I found when debugging grub-emu with 
valgrind
Regards
Vladimir 'phcoder' Serbinenko

[-- Attachment #2: scsi.patch --]
[-- Type: text/x-patch, Size: 4834 bytes --]

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 1999)
+++ ChangeLog	(working copy)
@@ -1,3 +1,120 @@
+2009-02-23  Vladimir Serbinenko  <phcoder@gmail.com>
+
+	Don't leak in SCSI code
+
+	* disk/scsi.c (grub_scsi_close): free scsi
+
+2009-02-13  Vladimir Serbinenko  <phcoder@gmail.com>
+
+	Test command
+
+	* commands/test.c: rewritten to use bash-like test
+	* include/grub/fs.h (struct grub_dirhook_info): new field 	
+	case_insensitive
+	* fs/hfsplus.c: declare FS as case-insensitive if necessary
+	* fs/fat.c: likewise
+	
+2009-02-12  Vladimir Serbinenko  <phcoder@gmail.com>
+
+	Support for mtime and further expandability of dir command
+
+	* include/grub/lib/datetime.h: moved to ...
+	* include/grub/datetime.h: ... moved here and added 
+	declaration of grub_unixtime2datetime. All users updated
+	* include/grub/fs.h: new syntax for dir and mtime functionin 
+	struct grub_fs 
+	* include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
+	and GRUB_FSHELP_FLAGS_MASK
+	* commands/ls.c (grub_ls_list_files): Write mtime in long format
+	* fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
+	(grub_ext2_mtime): new function
+	* fs/affs.c (grub_affs_dir): use new dir syntax
+	* fs/afs.c (grub_afs_dir): likewise
+	* fs/cpio.c (grub_cpio_dir): likewise
+	* fs/fat.c (grub_fat_find_dir): likewise
+	* fs/hfs.c (grub_hfs_dir): likewise
+	* fs/hfsplus.c (grub_hfsplus_dir): likewise
+	* fs/iso9660.c (grub_iso9660_dir): likewise
+	* fs/jfs.c (grub_jfs_dir): likewise
+	* fs/minix.c (grub_minix_dir): likewise
+	* fs/ntfs.c (grub_ntfs_dir): likewise
+	* fs/reiserfs.c (grub_reiserfs_dir): likewise
+	* fs/sfs.c (grub_sfs_dir): likewise
+	* fs/xfs.c (grub_xfs_dir): likewise
+	* fs/ufs.c (grub_ufs_dir): likewise
+	* util/hostfs.c (grub_hostfs_dir): likewise
+	* lib/datetime.c: moved to ...
+	* normal/datetime.c: ... moved here
+	(grub_unixtime2datetime): new function
+	* kern/rescue.c (grub_rescue_print_files): use new dir syntax
+	* normal/completition.c (iterate_dir): use new dir syntax
+	* normal/misc.c (grub_normal_print_device_info): tell the 
+	last modification time of a volume
+	* kern/fs.c (grub_fs_probe): updated dummy function to use new syntax 
+	* conf/common.rmk: added lib/datetime.c to ls.mod
+	* conf/i386-coreboot.rmk: added normal/datetime.c to grub-emu 
+	and normal.mod. Removed lib/datetime.c from datetime.mod
+	* conf/i386-efi.rmk: likewise
+	* conf/i386-ieee1275.rmk: likewise	
+	* conf/i386-pc.rmk: likewise
+	* conf/powerpc-ieee1275.rmk: likewise
+	* conf/sparc64-ieee1275.rmk: likewise	
+	* conf/x86_64-efi.rmk: likewise	
+	
+2009-02-11  Vladimir Serbinenko  <phcoder@gmail.com>
+
+	New command: "activate" replacement for makeactive of grub1
+	
+	* commands/i386/pc/activate.c: new file
+	* conf/i386-pc.rmk: new module activate.mod
+	add commands/i386/pc/activate.c to grub-emu sources
+
+2009-02-11  Vladimir Serbinenko  <phcoder@gmail.com>
+
+	Trim trailing spaces in FAT label and support mtools-like labels
+	
+	* fs/fat.c (grub_fat_iterate_dir): New function based 
+	on grub_fat_find_dir
+	(grub_fat_find_dir): use grub_fat_iterate_dir
+	(grub_fat_label): likewise
+
+2009-02-09  Vladimir Serbinenko  <phcoder@gmail.com>
+
+	Bugfix: directories not reported as such on case-insensitive hfs+
+
+	* include/grub/fshelp.h: included definition of GRUB_FSHELP_TYPE_MASK 
+	and GRUB_FSHELP_FLAGS_MASK
+	* fs/hfsplus.c (grub_hfsplus_dir): ignore filetype flags
+
+2009-02-09  Vladimir Serbinenko  <phcoder@gmail.com>
+
+	Bugfix: directories not reported as such on case-insensitive hfs+
+
+	* include/grub/fshelp.h: included definition of GRUB_FSHELP_TYPE_MASK 
+	and GRUB_FSHELP_FLAGS_MASK
+	* fs/hfsplus.c (grub_hfsplus_dir): ignore filetype flags
+
+2009-02-07  Vladimir Serbinenko  <phcoder@gmail.com>
+
+	Redraw character so it doesn't disappear after cursor moves from it
+
+	* term/gfterm.c (draw_cursor): Redraw character so it 
+	doesn't disappear after cursor moves from it
+	(GRUB_MOD_FINI): correct the name of the command
+
+2009-02-04  Vladimir Serbinenko  <phcoder@gmail.com>
+
+	Remove trailing spaces from FAT label
+
+	* fs/fat.c (grub_fat_label): Remove trailing spaces
+
+2009-02-04  Vladimir Serbinenko  <phcoder@gmail.com>
+
+	Add prefix option for grub-setup
+
+	* util/i386/pc/grub-setup.c (main): Add -p option.
+	(setup): additional argument prefix_dir
+
 2009-02-22  Robert Millan  <rmh@aybabtu.com>
 
 	* include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
Index: disk/scsi.c
===================================================================
--- disk/scsi.c	(revision 1999)
+++ disk/scsi.c	(working copy)
@@ -312,7 +312,8 @@
   grub_scsi_t scsi;
 
   scsi = disk->data;
-  return scsi->dev->close (scsi);
+  scsi->dev->close (scsi);
+  grub_free (scsi);
 }
 
 static grub_err_t

             reply	other threads:[~2009-02-23  8:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-23  8:57 phcoder [this message]
2009-02-27 21:27 ` Minor leak in scsi.c Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49A26517.5050106@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.