Index: uspace/drv/nic/ar9271/wmi.c
===================================================================
--- uspace/drv/nic/ar9271/wmi.c	(revision fa992e55b7eb79d903102158beb76ebf4e640de0)
+++ uspace/drv/nic/ar9271/wmi.c	(revision d3d267bd97e684571b3465431ce8e82ddb214fab)
@@ -230,4 +230,8 @@
 	size_t buffer_size = header_size + command_length;
 	void *buffer = malloc(buffer_size);
+	if (buffer == NULL) {
+		usb_log_error("Failed to allocated WMI message buffer (out of memory).\n");
+		return ENOMEM;
+	}
 
 	if (command_buffer != NULL)
