chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
udev: free fd before return in scsi_serial.c
[elogind.git]
/
src
/
udev
/
scsi_id
/
scsi_serial.c
diff --git
a/src/udev/scsi_id/scsi_serial.c
b/src/udev/scsi_id/scsi_serial.c
index 6bfb7f780cbf204e1e5692e9977e6c587a596b1d..3c52dee62dc2757a493617c59a5ed548e4aaaba7 100644
(file)
--- a/
src/udev/scsi_id/scsi_serial.c
+++ b/
src/udev/scsi_id/scsi_serial.c
@@
-469,10
+469,10
@@
static int prepend_vendor_model(struct udev *udev,
return ind;
}
return ind;
}
-/*
*
+/*
* check_fill_0x83_id - check the page 0x83 id, if OK allocate and fill
* serial number.
* check_fill_0x83_id - check the page 0x83 id, if OK allocate and fill
* serial number.
- *
*
/
+ */
static int check_fill_0x83_id(struct udev *udev,
struct scsi_id_device *dev_scsi,
unsigned char *page_83,
static int check_fill_0x83_id(struct udev *udev,
struct scsi_id_device *dev_scsi,
unsigned char *page_83,
@@
-799,6
+799,7
@@
static int do_scsi_page80_inquiry(struct udev *udev,
ser_ind = prepend_vendor_model(udev, dev_scsi, &serial[1]);
if (ser_ind < 0)
return 1;
ser_ind = prepend_vendor_model(udev, dev_scsi, &serial[1]);
if (ser_ind < 0)
return 1;
+ ser_ind++; /* for the leading 'S' */
for (i = 4; i < len + 4; i++, ser_ind++)
serial[ser_ind] = buf[i];
}
for (i = 4; i < len + 4; i++, ser_ind++)
serial[ser_ind] = buf[i];
}
@@
-920,7
+921,8
@@
int scsi_get_serial(struct udev *udev,
}
} else if (page_code != 0x00) {
log_debug("%s: unsupported page code 0x%d\n", dev_scsi->kernel, page_code);
}
} else if (page_code != 0x00) {
log_debug("%s: unsupported page code 0x%d\n", dev_scsi->kernel, page_code);
- return 1;
+ retval = 1;
+ goto completed;
}
/*
}
/*