[gnome-bluetooth] lib: Fix freeing uninitialised value
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] lib: Fix freeing uninitialised value
- Date: Mon, 8 Jun 2015 12:19:24 +0000 (UTC)
commit 10c4de2e8a04075b11c1c96a77d5aa4ceab9b132
Author: Bastien Nocera <hadess hadess net>
Date: Tue May 26 12:05:50 2015 +0200
lib: Fix freeing uninitialised value
modalias could be freed without being initialised if we bailed out
early.
From coverity:
gnome-bluetooth-3.14.1/lib/pin.c:81:2: warning: Assigned value is garbage or undefined
lib/pin.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/pin.c b/lib/pin.c
index 61e87ab..c5b1d9f 100644
--- a/lib/pin.c
+++ b/lib/pin.c
@@ -43,7 +43,7 @@ oui_to_vendor (const char *oui)
struct udev *udev;
struct udev_hwdb *hwdb;
struct udev_list_entry *list, *l;
- char *modalias;
+ char *modalias = NULL;
char *vendor = NULL;
if (oui == NULL ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]