gtask: fix leak in example code
[platform/upstream/glib.git] / gio / glocalfileiostream.c
index cb08061..b55d2aa 100644 (file)
@@ -13,9 +13,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  *
  * Author: Alexander Larsson <alexl@redhat.com>
  */
 #include "glocalfileinputstream.h"
 #include "glocalfileinfo.h"
 
-#include "gioalias.h"
+#ifdef G_OS_UNIX
+#include "gfiledescriptorbased.h"
+#endif
+
 
 #define g_local_file_io_stream_get_type _g_local_file_io_stream_get_type
 G_DEFINE_TYPE (GLocalFileIOStream, g_local_file_io_stream, G_TYPE_FILE_IO_STREAM);
@@ -60,6 +61,7 @@ _g_local_file_io_stream_new (GLocalFileOutputStream *output_stream)
   _g_local_file_output_stream_set_do_close (output_stream, FALSE);
   fd = _g_local_file_output_stream_get_fd (output_stream);
   stream->input_stream = (GInputStream *)_g_local_file_input_stream_new (fd);
+
   _g_local_file_input_stream_set_do_close (G_LOCAL_FILE_INPUT_STREAM (stream->input_stream),
                                           FALSE);