Bug 92721: bus-test and dbus-test failure on cross compile for windows - Ralf Habacker <ralf.habacker@freenet.de> - 10/29/2015 Back to Bug | Your Reviews | Help
Attachment 119509: Fix memory leak in _dbus_win_set_error_from_win_error() (update 1) - Ralf Habacker <ralf.habacker@freenet.de> - 11/9/2015 (View )

Show Quick Help

From: Ralf Habacker <ralf.habacker@freenet.de>
Date: Mon, 9 Nov 2015 13:32:02 +0100
Subject: [PATCH 1/2] Fix memory leak in _dbus_win_set_error_from_win_error().
There is not need to make a local (leaked) copy of the message,
because dbus_set_error() already makes a copy of its parameters.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
---
dbus/dbus-sysdeps-win.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
<Overall Comment>
Previous Reviews
Simon McVittie <smcv@collabora.com>
11/11/2015
-----------------------------------------------------------------
dbus/dbus-sysdeps-win.c
2377# define BACKTRACES
2378#endif
2379 
2380#undef BACKTRACES
Why?
If the backtrace code is broken or otherwise not useful (I've never had it work on Wine, but perhaps I'm using wrong toolchain settings), we should just delete it. If it's useful, we can keep it.
3604{
3605 char *msg;
3606 
3607 if (!error)
3608 return;
OK: minor optimization (not doing unnecessary work), harmless. Ideally this would be a separate commit though.
3615 (LPSTR) &msg, 0, NULL);
3616 if (msg)
3617 {
3618 dbus_set_error (error, "win32.error", "%s", msg);
OK: this is the actual bug fix.
Powered by Splinter

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.