Fix a Coverity bug *and* a FIXME comment in one fell swoop by pointlessly handling the almost-impossible case of OOM happening in dbus-send. Sigh.
Created attachment 129476 [details] [review] dbus-send: Handle OOM failures by aborting This is a fairly pointless feature to add, since the current behaviour was to abort due to a NULL pointer dereference shortly after the OOM failure. At least now people will get a helpful error message when they try to use dbus-send on a machine with incurable memory pressure. Coverity ID: 54710 Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment on attachment 129476 [details] [review] dbus-send: Handle OOM failures by aborting Review of attachment 129476 [details] [review]: ----------------------------------------------------------------- ::: tools/dbus-send.c @@ +155,5 @@ > fprintf (stderr, "%s: Unsupported data type %c\n", appname, (char) type); > exit (1); > } > + > + handle_oom (ret); You could use if (!ret) tool_oom ("building arguments"); by adding tool-common.[ch]. But no big deal either way really.
Fixed in git for 1.11.10, thanks
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.