pidgin/pidgin

44c107f92a65
Always ref result of g_io_stream_get_{input,output}_stream.

Sometimes we wrap those in other streams, sometimes not. This makes prpls inconsistent with each other on whether they unref their `GInputStream`/`GOutputStream` in prpl data during shutdown. Thus, ref it when it's not wrapped, so we can _always_ do an unref in the cleanup.

This fixes a read-after-free Jabber shutdown, and presumably one in Novell, since it appears to do the same thing.

Testing Done:
Ran with valgrind and see no invalid reads in jabber shutdown. Novell was not tested, but seems similar.

Reviewed at https://reviews.imfreedom.org/r/558/
/*
* untar.h
*
* Author: Herman Bloggs <hermanator12002@yahoo.com>
* Date: April, 2003
* Description: untar.c header
*/
#ifndef _UNTAR_H_
#define _UNTAR_H_
G_BEGIN_DECLS
typedef enum {
UNTAR_LISTING = (1 << 0),
UNTAR_QUIET = (1 << 1),
UNTAR_VERBOSE = (1 << 2),
UNTAR_FORCE = (1 << 3),
UNTAR_ABSPATH = (1 << 4),
UNTAR_CONVERT = (1 << 5)
} untar_opt;
int untar(const char *filename, const char *destdir, untar_opt options);
G_END_DECLS
#endif