From: Mark Cave-Ayland Date: Thu, 17 Dec 2009 11:11:46 +0000 (+0000) Subject: Fix memory scope error (resulting in segfault) accidentally introduced by the command... X-Git-Tag: 1.5.0b1~79 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab5a042bb06c31a5cb330b441d80a44dede42c66;p=postgis Fix memory scope error (resulting in segfault) accidentally introduced by the command line changes. git-svn-id: http://svn.osgeo.org/postgis/trunk@5018 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/loader/shp2pgsql-gui.c b/loader/shp2pgsql-gui.c index e3b30a40d..5ccd1a3ca 100644 --- a/loader/shp2pgsql-gui.c +++ b/loader/shp2pgsql-gui.c @@ -54,6 +54,7 @@ static char *pgui_errmsg = NULL; static PGconn *pg_connection; static SHPLOADERCONFIG *config; static SHPLOADERSTATE *state; +static SHPCONNECTIONCONFIG *conn; /* @@ -1033,8 +1034,6 @@ usage() int main(int argc, char *argv[]) { - SHPLOADERCONFIG *config; - SHPCONNECTIONCONFIG *conn; char c; /* Parse command line options and set configuration */ @@ -1070,10 +1069,6 @@ main(int argc, char *argv[]) exit(0); } } - - /* Setup the configuration */ - config = malloc(sizeof(SHPLOADERCONFIG)); - set_config_defaults(config); /* initialize the GTK stack */ gtk_init(&argc, &argv);