Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160319291
D6817.id17526.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6817.id17526.diff
View Options
Index: sys/dev/iwm/if_iwm.c
===================================================================
--- sys/dev/iwm/if_iwm.c
+++ sys/dev/iwm/if_iwm.c
@@ -1801,7 +1801,7 @@
struct iwm_nvm_section {
uint16_t length;
- const uint8_t *data;
+ uint8_t *data;
};
static int
@@ -1838,6 +1838,8 @@
"%s: Read NVM\n",
__func__);
+ memset(nvm_sections, 0, sizeof(nvm_sections));
+
/* TODO: find correct NVM max size for a section */
nvm_buffer = malloc(IWM_OTP_LOW_IMAGE_SIZE, M_DEVBUF, M_NOWAIT);
if (nvm_buffer == NULL)
@@ -1861,10 +1863,15 @@
nvm_sections[section].length = len;
}
free(nvm_buffer, M_DEVBUF);
- if (error)
- return error;
+ if (error == 0)
+ error = iwm_parse_nvm_sections(sc, nvm_sections);
- return iwm_parse_nvm_sections(sc, nvm_sections);
+ for (i = 0; i < IWM_NVM_NUM_OF_SECTIONS; i++) {
+ if (nvm_sections[i].data != NULL)
+ free(nvm_sections[i].data, M_DEVBUF);
+ }
+
+ return error;
}
/*
@@ -4986,6 +4993,7 @@
ieee80211_ifdetach(&sc->sc_ic);
/* Free descriptor rings */
+ iwm_free_rx_ring(sc, &sc->rxq);
for (i = 0; i < nitems(sc->txq); i++)
iwm_free_tx_ring(sc, &sc->txq[i]);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jun 24, 5:48 AM (16 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34275441
Default Alt Text
D6817.id17526.diff (1 KB)
Attached To
Mode
D6817: [iwm] Free rx ring on detach. Free nvm_sections data after parsing.
Attached
Detach File
Event Timeline
Log In to Comment