Bug 96077

Summary: [libdisk] memory leak in libdisk(3)'s Disk_Names()
Product: Base System Reporter: Jean-Yves Lefort <jylefort>
Component: kernAssignee: Antoine Brodin <antoine>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 6.0-RELEASE   
Hardware: Any   
OS: Any   

Description Jean-Yves Lefort freebsd_committer freebsd_triage 2006-04-20 00:20:16 UTC
disklist is leaked away. And the manpage is lying: "you must free each
pointer, as well as the array by hand".
Comment 1 dfilter service freebsd_committer freebsd_triage 2008-02-15 21:19:25 UTC
antoine     2008-02-15 21:19:15 UTC

  FreeBSD src repository

  Modified files:
    lib/libdisk          disk.c 
  Log:
  - Make Disk_Names() behave as documented in libdisk(3): return an array
  of disk names, where you must free each pointer, as well as the array
  by hand. [1]
  - Destaticize "disks" in Disk_Names, it has no reasons to be static.
  
  PR:             kern/96077 [1]
  PR:             kern/114110 [1]
  MFC after:      1 month
  Approved by:    rwatson (mentor)
  
  Revision  Changes    Path
  1.128     +14 -5     src/lib/libdisk/disk.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2008-02-15 21:20:51 UTC
State Changed
From-To: open->patched

patched in revision 1.128 of src/lib/libdisk/disk.c 


Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2008-02-15 21:20:51 UTC
Responsible Changed
From-To: freebsd-bugs->antoine

patched in revision 1.128 of src/lib/libdisk/disk.c
Comment 4 dfilter service freebsd_committer freebsd_triage 2008-03-17 19:05:41 UTC
antoine     2008-03-17 19:05:36 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_7)
    lib/libdisk          disk.c 
  Log:
  MFC to RELENG_7
    - Make Disk_Names() behave as documented in libdisk(3): return an array
    of disk names, where you must free each pointer, as well as the array
    by hand. [1]
    - Destaticize "disks" in Disk_Names, it has no reasons to be static.
  
    PR:             kern/96077 [1]
    PR:             kern/114110 [1]
    MFC after:      1 month
    Approved by:    rwatson (mentor)
  
  Revision   Changes    Path
  1.127.2.1  +14 -5     src/lib/libdisk/disk.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 dfilter service freebsd_committer freebsd_triage 2008-03-17 19:08:38 UTC
antoine     2008-03-17 19:08:33 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    lib/libdisk          disk.c 
  Log:
  MFC to RELENG_6
    - Make Disk_Names() behave as documented in libdisk(3): return an array
    of disk names, where you must free each pointer, as well as the array
    by hand. [1]
    - Destaticize "disks" in Disk_Names, it has no reasons to be static.
  
    PR:             kern/96077 [1]
    PR:             kern/114110 [1]
    MFC after:      1 month
    Approved by:    rwatson (mentor)
  
  Revision   Changes    Path
  1.125.2.2  +14 -5     src/lib/libdisk/disk.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Antoine Brodin freebsd_committer freebsd_triage 2008-03-17 19:11:42 UTC
State Changed
From-To: patched->closed

Close: fixed in HEAD, RELENG_7 and RELENG_6. 
Thanks for the report.