When freeing local_image_comments, set it to NULL so some nut doesn't try

When freeing local_image_comments, set it to NULL so some nut doesn't try to reuse that pointer elsewhere.
This commit is contained in:
Elliot Lee 1999-07-19 16:24:51 +00:00
parent c55b2ccfdc
commit fecdee626f
7 changed files with 7 additions and 7 deletions

View File

@ -535,7 +535,7 @@ load_image (char *filename, GRunModeType runmode)
/* if we had any comments then make a parasite for them */ /* if we had any comments then make a parasite for them */
if(local_image_comments) { if(local_image_comments) {
char *string=local_image_comments->str; char *string=local_image_comments->str;
g_string_free(local_image_comments,FALSE); g_string_free(local_image_comments,FALSE); local_image_comments = NULL;
comment_parasite = parasite_new("gimp-comment", PARASITE_PERSISTENT, comment_parasite = parasite_new("gimp-comment", PARASITE_PERSISTENT,
strlen(string)+1,string); strlen(string)+1,string);
} else { } else {

View File

@ -535,7 +535,7 @@ load_image (char *filename, GRunModeType runmode)
/* if we had any comments then make a parasite for them */ /* if we had any comments then make a parasite for them */
if(local_image_comments) { if(local_image_comments) {
char *string=local_image_comments->str; char *string=local_image_comments->str;
g_string_free(local_image_comments,FALSE); g_string_free(local_image_comments,FALSE); local_image_comments = NULL;
comment_parasite = parasite_new("gimp-comment", PARASITE_PERSISTENT, comment_parasite = parasite_new("gimp-comment", PARASITE_PERSISTENT,
strlen(string)+1,string); strlen(string)+1,string);
} else { } else {

View File

@ -535,7 +535,7 @@ load_image (char *filename, GRunModeType runmode)
/* if we had any comments then make a parasite for them */ /* if we had any comments then make a parasite for them */
if(local_image_comments) { if(local_image_comments) {
char *string=local_image_comments->str; char *string=local_image_comments->str;
g_string_free(local_image_comments,FALSE); g_string_free(local_image_comments,FALSE); local_image_comments = NULL;
comment_parasite = parasite_new("gimp-comment", PARASITE_PERSISTENT, comment_parasite = parasite_new("gimp-comment", PARASITE_PERSISTENT,
strlen(string)+1,string); strlen(string)+1,string);
} else { } else {

View File

@ -535,7 +535,7 @@ load_image (char *filename, GRunModeType runmode)
/* if we had any comments then make a parasite for them */ /* if we had any comments then make a parasite for them */
if(local_image_comments) { if(local_image_comments) {
char *string=local_image_comments->str; char *string=local_image_comments->str;
g_string_free(local_image_comments,FALSE); g_string_free(local_image_comments,FALSE); local_image_comments = NULL;
comment_parasite = parasite_new("gimp-comment", PARASITE_PERSISTENT, comment_parasite = parasite_new("gimp-comment", PARASITE_PERSISTENT,
strlen(string)+1,string); strlen(string)+1,string);
} else { } else {

View File

@ -535,7 +535,7 @@ load_image (char *filename, GRunModeType runmode)
/* if we had any comments then make a parasite for them */ /* if we had any comments then make a parasite for them */
if(local_image_comments) { if(local_image_comments) {
char *string=local_image_comments->str; char *string=local_image_comments->str;
g_string_free(local_image_comments,FALSE); g_string_free(local_image_comments,FALSE); local_image_comments = NULL;
comment_parasite = parasite_new("gimp-comment", PARASITE_PERSISTENT, comment_parasite = parasite_new("gimp-comment", PARASITE_PERSISTENT,
strlen(string)+1,string); strlen(string)+1,string);
} else { } else {

View File

@ -535,7 +535,7 @@ load_image (char *filename, GRunModeType runmode)
/* if we had any comments then make a parasite for them */ /* if we had any comments then make a parasite for them */
if(local_image_comments) { if(local_image_comments) {
char *string=local_image_comments->str; char *string=local_image_comments->str;
g_string_free(local_image_comments,FALSE); g_string_free(local_image_comments,FALSE); local_image_comments = NULL;
comment_parasite = parasite_new("gimp-comment", PARASITE_PERSISTENT, comment_parasite = parasite_new("gimp-comment", PARASITE_PERSISTENT,
strlen(string)+1,string); strlen(string)+1,string);
} else { } else {

View File

@ -535,7 +535,7 @@ load_image (char *filename, GRunModeType runmode)
/* if we had any comments then make a parasite for them */ /* if we had any comments then make a parasite for them */
if(local_image_comments) { if(local_image_comments) {
char *string=local_image_comments->str; char *string=local_image_comments->str;
g_string_free(local_image_comments,FALSE); g_string_free(local_image_comments,FALSE); local_image_comments = NULL;
comment_parasite = parasite_new("gimp-comment", PARASITE_PERSISTENT, comment_parasite = parasite_new("gimp-comment", PARASITE_PERSISTENT,
strlen(string)+1,string); strlen(string)+1,string);
} else { } else {