summaryrefslogtreecommitdiff
path: root/audio/cdparanoia/patches/patch-ci
blob: bc36f8635d0af2b057b5b08d5dda84a8173dae15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$NetBSD: patch-ci,v 1.3 2006/05/14 21:31:01 minskim Exp $

--- interface/interface.c.orig	2000-04-19 22:41:04.000000000 +0000
+++ interface/interface.c
@@ -30,12 +30,25 @@ int cdda_close(cdrom_drive *d){
 
     _clean_messages(d);
     if(d->cdda_device_name)free(d->cdda_device_name);
+#if !defined(__FreeBSD__) && !defined(__DragonFly__)
     if(d->ioctl_device_name)free(d->ioctl_device_name);
     if(d->drive_model)free(d->drive_model);
     if(d->cdda_fd!=-1)close(d->cdda_fd);
     if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd);
     if(d->sg)free(d->sg);
-    
+#else
+    if(d->drive_model)
+	  free(d->drive_model);
+    if(d->ccb)
+	  cam_freeccb(d->ccb);
+    if(d->dev)
+	  cam_close_device(d->dev);
+    if(d->sg_buffer)
+	  free(d->sg_buffer);
+    if(d->ioctl_fd != -1)
+	  close(d->ioctl_fd);
+#endif
+
     free(d);
   }
   return(0);