Page MenuHomeFreeBSD

D36827.diff
No OneTemporary

D36827.diff

diff --git a/sbin/nvmecontrol/modules/wdc/wdc.c b/sbin/nvmecontrol/modules/wdc/wdc.c
--- a/sbin/nvmecontrol/modules/wdc/wdc.c
+++ b/sbin/nvmecontrol/modules/wdc/wdc.c
@@ -268,7 +268,7 @@
wdc_get_dui_log_size(int fd, uint32_t opcode, uint8_t data_area,
uint64_t *log_size, int len_off)
{
- uint8_t *hdr;
+ uint8_t *hdr, *tofree;
uint8_t max_sections;
int i, j;
uint16_t hdr_ver;
@@ -277,7 +277,7 @@
dui_size = 0;
len = 1024;
- hdr = (uint8_t*)malloc(len);
+ tofree = hdr = (uint8_t*)malloc(len);
if (hdr == NULL)
errx(EX_OSERR, "Can't get buffer to read header");
wdc_get_data_dui(fd, opcode, len, 0, hdr, len);
@@ -315,7 +315,7 @@
errx(EX_PROTOCOL, "ERROR : No valid header ");
*log_size = dui_size;
- free(hdr);
+ free(tofree);
}
static void

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 3, 9:14 PM (21 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16442680
Default Alt Text
D36827.diff (778 B)

Event Timeline