libvirt/src/rpc
Michal Privoznik 862298a2e7 dbus: Don't unref NULL messages
Apparently we are not the only ones with dumb free functions
because dbus_message_unref() does not accept NULL either. But if
I were to vote, this one is even more evil. Instead of returning
an error just like we do it immediately dereference any pointer
passed and thus crash you app. Well done DBus!

  Program received signal SIGSEGV, Segmentation fault.
  [Switching to Thread 0x7f878ebda700 (LWP 31264)]
  0x00007f87be4016e5 in ?? () from /usr/lib64/libdbus-1.so.3
  (gdb) bt
  #0  0x00007f87be4016e5 in ?? () from /usr/lib64/libdbus-1.so.3
  #1  0x00007f87be3f004e in dbus_message_unref () from /usr/lib64/libdbus-1.so.3
  #2  0x00007f87bf6ecf95 in virSystemdGetMachineNameByPID (pid=9849) at util/virsystemd.c:228
  #3  0x00007f879761bd4d in qemuConnectCgroup (driver=0x7f87600a32a0, vm=0x7f87600c7550) at qemu/qemu_cgroup.c:909
  #4  0x00007f87976386b7 in qemuProcessReconnect (opaque=0x7f87600db840) at qemu/qemu_process.c:3386
  #5  0x00007f87bf6edfff in virThreadHelper (data=0x7f87600d5580) at util/virthread.c:206
  #6  0x00007f87bb602334 in start_thread (arg=0x7f878ebda700) at pthread_create.c:333
  #7  0x00007f87bb3481bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
  (gdb) frame 2
  #2  0x00007f87bf6ecf95 in virSystemdGetMachineNameByPID (pid=9849) at util/virsystemd.c:228
  228         dbus_message_unref(reply);
  (gdb) p reply
  $1 = (DBusMessage *) 0x0

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-02-11 11:35:02 +01:00
..
gendispatch.pl remote: enforce VIR_TYPED_PARAM_STRING_OKAY flag on client side serialization 2016-02-08 14:59:54 +01:00
genprotocol.pl Add support for portable-rpcgen from portablexdr library 2015-07-08 14:34:38 +02:00
gensystemtap.pl build: predictably generate systemtap tapsets (bz 1173641) 2016-01-20 10:26:02 -05:00
virkeepalive.c client rpc: Report proper error for keepalive disconnections 2015-09-23 13:09:49 +02:00
virkeepalive.h
virkeepaliveprotocol.x
virnetclient.c client rpc: Process pending data on error 2015-09-23 13:09:50 +02:00
virnetclient.h rpc: allow selection of TCP address family 2015-06-11 12:11:18 +01:00
virnetclientprogram.c
virnetclientprogram.h
virnetclientstream.c Use VIR_DIV_UP macro where possible 2015-09-23 11:45:59 +02:00
virnetclientstream.h
virnetdaemon.c dbus: Don't unref NULL messages 2016-02-11 11:35:02 +01:00
virnetdaemon.h rpc: Add virNetDaemonHasClients 2015-07-10 10:50:22 +02:00
virnetmessage.c
virnetmessage.h
virnetprotocol.x Unify int types handling in protocol files 2016-01-11 19:56:06 +03:00
virnetsaslcontext.c
virnetsaslcontext.h
virnetserver.c virJSONValueArraySize: return ssize_t 2015-10-09 15:25:08 +02:00
virnetserver.h rpc: Remove keepalive_required option 2015-08-10 13:15:56 +02:00
virnetserverclient.c rpc: Don't rewrite msg->fds on every read dispatch 2016-01-12 08:56:50 +01:00
virnetserverclient.h
virnetservermdns.c mdns: Set error when failing due to missing avahi 2015-06-05 13:41:35 +02:00
virnetservermdns.h
virnetserverprogram.c
virnetserverprogram.h Move daemon-related parts of virNetServer to virNetDaemon 2015-06-16 13:46:19 +02:00
virnetserverservice.c virJSONValueArraySize: return ssize_t 2015-10-09 15:25:08 +02:00
virnetserverservice.h rpc: allow selection of TCP address family 2015-06-11 12:11:18 +01:00
virnetsocket.c rpc: socket: Don't repeatedly attempt to launch daemon 2016-01-12 10:45:45 -05:00
virnetsocket.h rpc: add API for checking IPv4/6 availability 2015-06-11 12:11:18 +01:00
virnetsshsession.c rpc: libssh2: Fix regression in ssh host key verification 2015-10-05 07:38:18 +02:00
virnetsshsession.h
virnettlscontext.c
virnettlscontext.h