Upload Tizen:Base source
[external/binutils.git] / packaging / 161_ar_delete_members.diff
1 --- a/binutils/ar.c
2 +++ b/binutils/ar.c
3 @@ -1069,7 +1069,6 @@
4  
5    if (smart_rename (new_name, old_name, 0) != 0)
6      xexit (1);
7 -  free (old_name);
8  }
9  
10  /* Return a pointer to the pointer to the entry which should be rplacd'd
11 @@ -1119,7 +1118,6 @@
12    bfd_boolean found;
13    bfd_boolean something_changed = FALSE;
14    int match_count;
15 -  const char * tmp = NULL;
16  
17    for (; *files_to_delete != NULL; ++files_to_delete)
18      {
19 @@ -1141,10 +1139,8 @@
20        current_ptr_ptr = &(arch->archive_next);
21        while (*current_ptr_ptr)
22         {
23 -         if (tmp != NULL)
24 -           free ((char *) tmp);
25 -         tmp = normalize (*files_to_delete, arch);
26 -         if (FILENAME_CMP (tmp, (*current_ptr_ptr)->filename) == 0)
27 +         if (FILENAME_CMP (normalize (*files_to_delete, arch),
28 +                           (*current_ptr_ptr)->filename) == 0)
29             {
30               ++match_count;
31               if (counted_name_mode
32 @@ -1181,9 +1177,6 @@
33      write_archive (arch);
34    else
35      output_filename = NULL;
36 -
37 -  if (tmp != NULL)
38 -    free ((char *) tmp);
39  }
40  
41