Diff between 04e18c0dcbc108843b4e53075c55b873e2afb786 and 6169001a2b57eab09743467b4392d554f1a26e92

Changed Files

File Additions Deletions Status
src/shared/log.c +1 -1 modified

Full Patch

diff --git a/src/shared/log.c b/src/shared/log.c
index 3f18e80..22b9850 100644
--- a/src/shared/log.c
+++ b/src/shared/log.c
@@ -135,7 +135,7 @@ int bt_log_vprintf(uint16_t index, const char *label, int level,
 	int len;
 
 	len = vasprintf(&str, format, ap);
-	if (len < 0)
+	if (len < 0 || !str)
 		return errno;
 
 	len = strlen(str);