projects
/
free-sw
/
xcb
/
demo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f06e6e5
)
Fix memory leak and warning regarding adaptors_rep. Return 0 from main for successfu...
author
Josh Triplett
<josh@freedesktop.org>
Fri, 28 Apr 2006 19:40:09 +0000
(12:40 -0700)
committer
Josh Triplett
<josh@freedesktop.org>
Fri, 28 Apr 2006 19:40:09 +0000
(12:40 -0700)
xcbxvinfo.c
patch
|
blob
|
history
diff --git
a/xcbxvinfo.c
b/xcbxvinfo.c
index
3285cea
..
f2341e4
100644
(file)
--- a/
xcbxvinfo.c
+++ b/
xcbxvinfo.c
@@
-102,6
+102,7
@@
int main(int argc, char *argv[])
adaptors_rep = XCBXvQueryAdaptorsReply(c, XCBXvQueryAdaptors(c, root_window), NULL);
if (!adaptors_rep->num_adaptors) {
fprintf(stdout, " no adaptors present.\n");
+ free(adaptors_rep);
continue;
}
@@
-338,10
+339,8
@@
int main(int argc, char *argv[])
free(qencodings_rep);
XCBXvAdaptorInfoNext(&adaptors_iter);
}
+ free(adaptors_rep);
}
- free(adaptors_rep);
- adaptors_rep = NULL;
-
- return 1;
+ return 0;
}