If a device is disconnected, the program calls "broadcast" function. While calling this function it crashes. The error shows: double free or corruption (out): 0x01114358 *** Aborted