*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
+#ifdef HAVE_STRING_H
#include <string.h>
+#endif
#include <glib.h>
+#ifdef HAVE_MATH_H
#include <math.h>
+#endif
+#ifdef HAVE_STDLIB_H
#include <stdlib.h>
+#endif
#include <zlib.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Header */
f = g_fopen(file, "r");
- if ( !f )
+ if ( !f ) {
+ g_free ( rv );
return NULL;
+ }
buffer[fread(buffer, 1, DEM_BLOCK_SIZE, f)] = '\0';
if ( ! dem_parse_header ( buffer, rv ) ) {
g_free ( rv );