Page MenuHomeFreeBSD

D32075.id95550.diff
No OneTemporary

D32075.id95550.diff

Index: sys/dev/sdhci/sdhci.c
===================================================================
--- sys/dev/sdhci/sdhci.c
+++ sys/dev/sdhci/sdhci.c
@@ -264,7 +264,11 @@
{
struct sbuf s;
- sbuf_new(&s, NULL, 1024, SBUF_AUTOEXTEND);
+ if (sbuf_new(&s, NULL, 1024, SBUF_NOWAIT | SBUF_AUTOEXTEND) == NULL) {
+ slot_printf(slot, "sdhci_dumpregs: Failed to allocate memory for sbuf\n");
+ return;
+ }
+
sbuf_set_drain(&s, &sbuf_printf_drain, NULL);
sdhci_dumpregs_buf(slot, &s);
sbuf_finish(&s);
@@ -340,7 +344,11 @@
{
struct sbuf s;
- sbuf_new(&s, NULL, 1024, SBUF_AUTOEXTEND);
+ if (sbuf_new(&s, NULL, 1024, SBUF_NOWAIT | SBUF_AUTOEXTEND) == NULL) {
+ slot_printf(slot, "sdhci_dumpcaps: Failed to allocate memory for sbuf\n");
+ return;
+ }
+
sbuf_set_drain(&s, &sbuf_printf_drain, NULL);
sdhci_dumpcaps_buf(slot, &s);
sbuf_finish(&s);

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 28, 3:43 PM (21 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32288846
Default Alt Text
D32075.id95550.diff (859 B)

Event Timeline