Free ptr only if necessary (around CID 1491058).
authorwwp <subscript@free.fr>
Thu, 7 Oct 2021 07:30:52 +0000 (09:30 +0200)
committerwwp <subscript@free.fr>
Thu, 7 Oct 2021 07:30:52 +0000 (09:30 +0200)
src/ldif.c

index a7761f21df9763a0e4614590c3ea7bdb36dfa77f..5b956d452b4e949002e26ed80b809708338235e2 100644 (file)
@@ -714,8 +714,8 @@ static void ldif_read_file( LdifFile *ldifFile, AddressCache *cache ) {
                                        g_free( tagName );
                                }
                        }
+                       g_free( line );
                }
-               g_free( line );
        }
 
        /* Release data */
@@ -889,8 +889,8 @@ static void ldif_read_tag_list( LdifFile *ldifFile ) {
                                        }
                                }
                        }
+                       g_free( line );
                }
-               g_free( line );
        }
 
        /* Release data */