virFileNBDDeviceAssociate: Avoid use of uninitialized variable

The @qemunbd variable can be used uninitialized.

(cherry picked from commit 2dba0323ff0cec31bdcea9dd3b2428af297401f2)
This commit is contained in:
Michal Privoznik 2013-09-03 18:56:06 +02:00 committed by Eric Blake
parent c56f17e543
commit b5eab6a984

View File

@ -738,7 +738,7 @@ int virFileNBDDeviceAssociate(const char *file,
char **dev) char **dev)
{ {
char *nbddev; char *nbddev;
char *qemunbd; char *qemunbd = NULL;
virCommandPtr cmd = NULL; virCommandPtr cmd = NULL;
int ret = -1; int ret = -1;
const char *fmtstr = NULL; const char *fmtstr = NULL;