Send commitlog mailing list submissions to
        commitlog@lists.openmoko.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. Holger's qtopia repo: Changes to 'master' ([EMAIL PROTECTED])
   2. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.april-update'
      ([EMAIL PROTECTED])
   3. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.april-update'
      ([EMAIL PROTECTED])
   4. r4443 - in trunk/src/target/opkg: libopkg tests
      ([EMAIL PROTECTED])
--- Begin Message ---
 apps-fdo/Applications/qtopia-addressbook.desktop   |    1 +
 apps-fdo/Applications/qtopia-archives.desktop      |    1 +
 apps-fdo/Applications/qtopia-bluetooth.desktop     |    1 +
 apps-fdo/Applications/qtopia-calculator.desktop    |    1 +
 apps-fdo/Applications/qtopia-callhistory.desktop   |    1 +
 apps-fdo/Applications/qtopia-callscreen.desktop    |    1 +
 apps-fdo/Applications/qtopia-camera.desktop        |    1 +
 apps-fdo/Applications/qtopia-clock.desktop         |    1 +
 apps-fdo/Applications/qtopia-datebook.desktop      |    1 +
 apps-fdo/Applications/qtopia-dialer.desktop        |    1 +
 apps-fdo/Applications/qtopia-helpbrowser.desktop   |    1 +
 apps-fdo/Applications/qtopia-mediaplayer.desktop   |    1 +
 apps-fdo/Applications/qtopia-mediarecorder.desktop |    1 +
 apps-fdo/Applications/qtopia-photoedit.desktop     |    1 +
 apps-fdo/Applications/qtopia-qtmail.desktop        |    1 +
 apps-fdo/Applications/qtopia-simapp.desktop        |    1 +
 apps-fdo/Applications/qtopia-sysinfo.desktop       |    1 +
 apps-fdo/Applications/qtopia-textedit.desktop      |    1 +
 apps-fdo/Applications/qtopia-todolist.desktop      |    1 +
 apps-fdo/Games/qtopia-fifteen.desktop              |    1 +
 apps-fdo/Games/qtopia-minesweep.desktop            |    1 +
 apps-fdo/Games/qtopia-qasteroids.desktop           |    1 +
 apps-fdo/Games/qtopia-snake.desktop                |    1 +
 apps-fdo/Settings/qtopia-appearance.desktop        |    1 +
 apps-fdo/Settings/qtopia-beaming.desktop           |    1 +
 apps-fdo/Settings/qtopia-btsettings.desktop        |    1 +
 apps-fdo/Settings/qtopia-calibrate.desktop         |    1 +
 apps-fdo/Settings/qtopia-callforwarding.desktop    |    1 +
 apps-fdo/Settings/qtopia-drmbrowser.desktop        |    1 +
 apps-fdo/Settings/qtopia-handwriting.desktop       |    1 +
 apps-fdo/Settings/qtopia-homescreen.desktop        |    1 +
 apps-fdo/Settings/qtopia-language.desktop          |    1 +
 apps-fdo/Settings/qtopia-light-and-power.desktop   |    1 +
 apps-fdo/Settings/qtopia-logging.desktop           |    1 +
 apps-fdo/Settings/qtopia-network.desktop           |    1 +
 apps-fdo/Settings/qtopia-packagemanager.desktop    |    1 +
 apps-fdo/Settings/qtopia-phonenetworks.desktop     |    1 +
 apps-fdo/Settings/qtopia-phonesettings.desktop     |    1 +
 apps-fdo/Settings/qtopia-quit.desktop              |    1 +
 apps-fdo/Settings/qtopia-ringprofile.desktop       |    1 +
 apps-fdo/Settings/qtopia-security.desktop          |    1 +
 apps-fdo/Settings/qtopia-serverwidgets.desktop     |    1 +
 apps-fdo/Settings/qtopia-sipsettings.desktop       |    1 +
 apps-fdo/Settings/qtopia-speeddial.desktop         |    1 +
 apps-fdo/Settings/qtopia-startupflags.desktop      |    1 +
 apps-fdo/Settings/qtopia-systemtime.desktop        |    1 +
 apps-fdo/Settings/qtopia-taskmanager.desktop       |    1 +
 apps-fdo/Settings/qtopia-words.desktop             |    1 +
 apps-fdo/Settings/qtopia-worldtime.desktop         |    1 +
 pixmaps/addressbook/AddressBook-screenshot.jpg     |  Bin
 pixmaps/addressbook/AddressBook.jpg                |  Bin
 pixmaps/addressbook/AddressBook.png                |  Bin
 pixmaps/appearance/Appearance-screenshot.jpg       |  Bin
 pixmaps/appearance/Appearance.jpg                  |  Bin
 pixmaps/appearance/Appearance.png                  |  Bin
 pixmaps/archives/Archives-screenshot.jpg           |  Bin
 pixmaps/archives/Archives.jpg                      |  Bin
 pixmaps/archives/Archives.png                      |  Bin
 pixmaps/beaming/Infrared-screenshot.jpg            |  Bin
 pixmaps/beaming/Infrared.jpg                       |  Bin
 pixmaps/beaming/Infrared.png                       |  Bin
 pixmaps/btsettings/BTSettings-screenshot.jpg       |  Bin
 pixmaps/btsettings/BTSettings.jpg                  |  Bin
 pixmaps/btsettings/BTSettings.png                  |  Bin
 pixmaps/calculator/Calculator-screenshot.jpg       |  Bin
 pixmaps/calculator/Calculator.jpg                  |  Bin
 pixmaps/calculator/Calculator.png                  |  Bin
 pixmaps/calibrate/Calibrate-screenshot.jpg         |  Bin
 pixmaps/calibrate/Calibrate.jpg                    |  Bin
 pixmaps/calibrate/Calibrate.png                    |  Bin
 .../callforwarding/CallForwarding-screenshot.jpg   |  Bin
 pixmaps/callforwarding/CallForwarding.jpg          |  Bin
 pixmaps/callforwarding/CallForwarding.png          |  Bin
 pixmaps/callhistory/CallHistory-screenshot.jpg     |  Bin
 pixmaps/callhistory/CallHistory.jpg                |  Bin
 pixmaps/callhistory/CallHistory.png                |  Bin
 pixmaps/camera/Camera-screenshot.jpg               |  Bin
 pixmaps/camera/Camera.jpg                          |  Bin
 pixmaps/camera/Camera.png                          |  Bin
 pixmaps/clock/Clock-screenshot.jpg                 |  Bin
 pixmaps/clock/Clock.jpg                            |  Bin
 pixmaps/clock/Clock.png                            |  Bin
 pixmaps/datebook/DateBook-screenshot.jpg           |  Bin
 pixmaps/datebook/DateBook.jpg                      |  Bin
 pixmaps/datebook/DateBook.png                      |  Bin
 pixmaps/drm/Drm-screenshot.jpg                     |  Bin
 pixmaps/drm/Drm.jpg                                |  Bin
 pixmaps/drm/Drm.png                                |  Bin
 pixmaps/fifteen/Fifteen-screenshot.jpg             |  Bin
 pixmaps/fifteen/Fifteen.jpg                        |  Bin
 pixmaps/fifteen/Fifteen.png                        |  Bin
 pixmaps/helpbrowser/HelpBrowser-screenshot.jpg     |  Bin
 pixmaps/helpbrowser/HelpBrowser.jpg                |  Bin
 pixmaps/helpbrowser/HelpBrowser.png                |  Bin
 pixmaps/homescreen/homescreen-screenshot.jpg       |  Bin
 pixmaps/homescreen/homescreen.jpg                  |  Bin
 pixmaps/homescreen/homescreen.png                  |  Bin
 .../hwsettings/recognition_settings-screenshot.jpg |  Bin
 pixmaps/hwsettings/recognition_settings.jpg        |  Bin
 pixmaps/hwsettings/recognition_settings.png        |  Bin
 pixmaps/language/Language-screenshot.jpg           |  Bin
 pixmaps/language/Language.jpg                      |  Bin
 pixmaps/language/Language.png                      |  Bin
 pixmaps/light-and-power/Light-screenshot.jpg       |  Bin
 pixmaps/light-and-power/Light.jpg                  |  Bin
 pixmaps/light-and-power/Light.png                  |  Bin
 pixmaps/mediaplayer/VideoPlayer-screenshot.jpg     |  Bin
 pixmaps/mediaplayer/VideoPlayer.jpg                |  Bin
 pixmaps/mediaplayer/VideoPlayer.png                |  Bin
 pixmaps/mediarecorder/SoundRecorder-screenshot.jpg |  Bin
 pixmaps/mediarecorder/SoundRecorder.jpg            |  Bin
 pixmaps/mediarecorder/SoundRecorder.png            |  Bin
 pixmaps/minesweep/MineHunt-screenshot.jpg          |  Bin
 pixmaps/minesweep/MineHunt.jpg                     |  Bin
 pixmaps/minesweep/MineHunt.png                     |  Bin
 pixmaps/netsetup/PPPConnect-screenshot.jpg         |  Bin
 pixmaps/netsetup/PPPConnect.jpg                    |  Bin
 pixmaps/netsetup/PPPConnect.png                    |  Bin
 .../packagemanager/PackageManager-screenshot.jpg   |  Bin
 pixmaps/packagemanager/PackageManager.jpg          |  Bin
 pixmaps/packagemanager/PackageManager.png          |  Bin
 pixmaps/phonenetworks/PhoneNetworks-screenshot.jpg |  Bin
 pixmaps/phonenetworks/PhoneNetworks.jpg            |  Bin
 pixmaps/phonenetworks/PhoneNetworks.png            |  Bin
 pixmaps/phonesettings/PhoneSettings-screenshot.jpg |  Bin
 pixmaps/phonesettings/PhoneSettings.jpg            |  Bin
 pixmaps/phonesettings/PhoneSettings.png            |  Bin
 pixmaps/photoedit/ImageViewer-screenshot.jpg       |  Bin
 pixmaps/photoedit/ImageViewer.jpg                  |  Bin
 pixmaps/photoedit/ImageViewer.png                  |  Bin
 pixmaps/profileedit/Note-screenshot.jpg            |  Bin
 pixmaps/profileedit/Note.jpg                       |  Bin
 pixmaps/profileedit/Note.png                       |  Bin
 pixmaps/qpe/AppsIcon-screenshot.jpg                |  Bin
 pixmaps/qpe/AppsIcon.jpg                           |  Bin
 pixmaps/qpe/AppsIcon.png                           |  Bin
 pixmaps/qtmail/EMail-screenshot.jpg                |  Bin
 pixmaps/qtmail/EMail.jpg                           |  Bin
 pixmaps/qtmail/EMail.png                           |  Bin
 pixmaps/security/Security-screenshot.jpg           |  Bin
 pixmaps/security/Security.jpg                      |  Bin
 pixmaps/security/Security.png                      |  Bin
 pixmaps/serverwidgets/ServerWidgets-screenshot.jpg |  Bin
 pixmaps/serverwidgets/ServerWidgets.jpg            |  Bin
 pixmaps/serverwidgets/ServerWidgets.png            |  Bin
 pixmaps/simapp/simapp-screenshot.jpg               |  Bin
 pixmaps/simapp/simapp.jpg                          |  Bin
 pixmaps/simapp/simapp.png                          |  Bin
 pixmaps/sipsettings/SIP-screenshot.jpg             |  Bin
 pixmaps/sipsettings/SIP.jpg                        |  Bin
 pixmaps/sipsettings/SIP.png                        |  Bin
 pixmaps/snake/Snake-screenshot.jpg                 |  Bin
 pixmaps/snake/Snake.jpg                            |  Bin
 pixmaps/snake/Snake.png                            |  Bin
 pixmaps/speeddial/speeddial-screenshot.jpg         |  Bin
 pixmaps/speeddial/speeddial.jpg                    |  Bin
 pixmaps/speeddial/speeddial.png                    |  Bin
 pixmaps/sysinfo/SystemInfo-screenshot.jpg          |  Bin
 pixmaps/sysinfo/SystemInfo.jpg                     |  Bin
 pixmaps/sysinfo/SystemInfo.png                     |  Bin
 pixmaps/systemtime/DateTime-screenshot.jpg         |  Bin
 pixmaps/systemtime/DateTime.jpg                    |  Bin
 pixmaps/systemtime/DateTime.png                    |  Bin
 pixmaps/textedit/TextEditor-screenshot.jpg         |  Bin
 pixmaps/textedit/TextEditor.jpg                    |  Bin
 pixmaps/textedit/TextEditor.png                    |  Bin
 pixmaps/todolist/TodoList-screenshot.jpg           |  Bin
 pixmaps/todolist/TodoList.jpg                      |  Bin
 pixmaps/todolist/TodoList.png                      |  Bin
 pixmaps/words/Words-screenshot.jpg                 |  Bin
 pixmaps/words/Words.jpg                            |  Bin
 pixmaps/words/Words.png                            |  Bin
 pixmaps/worldtime/CityTime-screenshot.jpg          |  Bin
 pixmaps/worldtime/CityTime.jpg                     |  Bin
 pixmaps/worldtime/CityTime.png                     |  Bin
 175 files changed, 49 insertions(+), 0 deletions(-)

New commits:
commit 42a0439d9bad9627a27fe311ded012f49967ad82
Author: Holger Freyther <[EMAIL PROTECTED]>
Date:   Tue May 20 16:51:37 2008 +0200

    Changing of icons. Provide two copies, classic Icons and Screenshots. 
Update the desktop files
        - Use 128x128 for Icon
        - Use jpeg because e can load them faster
        - Use non-transparent backgrounds

commit a229e71c759d5ab0165c41b4271df265ca4a1950
Author: Holger Freyther <[EMAIL PROTECTED]>
Date:   Tue May 20 16:39:11 2008 +0200

    Revert "Make white transparent in the icons."
    
    The "sliding launcher" needs to have a background color
    
    This reverts commit afc90c286993c6e633936aeb5a078ad73ec69496.




--- End Message ---
--- Begin Message ---
 conf/checksums.ini                                 |   64 ++++++++++++++++++++
 conf/distro/include/sane-srcrevs.inc               |    8 +-
 packages/openmoko-projects/diversity-daemon_svn.bb |    7 +-
 .../diversity-maps-providence_20080430.bb          |    7 ++
 .../diversity-maps-taipei_20080430.bb              |    2 +-
 packages/qtopia-phone/qtopia-phone-x11_4.3.1.bb    |   59 ++++++++++++++++--
 packages/tasks/task-openmoko-qtopia-x11.bb         |   10 +++-
 7 files changed, 140 insertions(+), 17 deletions(-)

New commits:
commit 46a8fc6bf2cb7d464ee9130a22fcb4c7184a9c2d
Author: Holger Freyther <[EMAIL PROTECTED](none)>
Date:   Tue May 20 18:39:48 2008 +0200

    [checksums] Add my sums for scowl

commit 4dca6d4d38cd0c2c84f66d4fef9998c6caf0277b
Author: Holger Freyther <[EMAIL PROTECTED](none)>
Date:   Tue May 20 18:39:36 2008 +0200

    [checksums] Add my sums for setuptools

commit 6211e6897e09a3a096333f5b89eec127f91ab25e
Author: Holger Freyther <[EMAIL PROTECTED](none)>
Date:   Tue May 20 18:39:24 2008 +0200

    [checksums] Add my sums for rsync

commit 602d088337b0ae04c4d18c3884884ad83a952679
Author: Holger Freyther <[EMAIL PROTECTED](none)>
Date:   Tue May 20 18:39:11 2008 +0200

    [checksums] Add my sums for cython

commit 724585123ecc4cfe57cadffa69ef7e2fee1fc9cc
Author: Holger Freyther <[EMAIL PROTECTED](none)>
Date:   Tue May 20 18:38:58 2008 +0200

    [checksums] Add my sums for Pyrex

commit 175444b8b628519c2e550c5810bd5370dc2e0b49
Author: Holger Freyther <[EMAIL PROTECTED](none)>
Date:   Tue May 20 18:35:16 2008 +0200

    [checksums] Add my sums for libtool

commit bc100dba57329ebca4cf49dd961ead73a8d85c94
Author: Holger Freyther <[EMAIL PROTECTED](none)>
Date:   Tue May 20 18:35:04 2008 +0200

    [checksums] Add my sums for dbus

commit ab1026a94a9a3e830b93f2c99195ec09d931b932
Author: Holger Freyther <[EMAIL PROTECTED](none)>
Date:   Tue May 20 18:34:50 2008 +0200

    [checksums] Add my sums for curl

commit ee2937747b3471aa87faf86625c02dbc913450f4
Author: Holger Freyther <[EMAIL PROTECTED](none)>
Date:   Tue May 20 18:34:05 2008 +0200

    [checksums] Add my sums for bash

commit 80baccbac888afe25c653f771f829046953f82cd
Author: Holger Freyther <[EMAIL PROTECTED](none)>
Date:   Tue May 20 18:31:50 2008 +0200

    [diversity] Bump the PR as olv changed the upstream http file...

commit c8432b2211a360d3a98316905fd9637ecd5eeb40
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Tue May 20 18:29:13 2008 +0200

    [diversity] Add another map file

commit b5a5bf28094cf8189a24308f27763aa40276198c
Author: Willie Chen <[EMAIL PROTECTED]>
Date:   Tue May 20 18:26:06 2008 +0200

    [srcrev] Build exposure r22

commit 09d02708d777c8020ffeff5745ade78fde2a9fc1
Author: Holger Freyther <[EMAIL PROTECTED](none)>
Date:   Tue May 20 18:25:24 2008 +0200

    [srcrev] Update diversity-daemon and diversity as of Jeremy's and Julian's 
request

commit ce73574e27112b8fb399c74e4cca0090535ebb59
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Tue May 20 18:22:30 2008 +0200

    [diversity-daemon] Do not use eds-dbus.

commit 6c5f2f83987a338fb996d61d1f56489051565ed3
Author: Holger Freyther <[EMAIL PROTECTED](none)>
Date:   Tue May 20 18:16:19 2008 +0200

    Update Qtopia (picture changes) and change packaging of Qtopia
        We sometimes don't want to have the app icons. Make sure we
        remove help, quit and taskmanager. Make it possible to remove
        callscreen, call forwarding, call options, call settings and
        profile edit once we have an alternative way to trigger




--- End Message ---
--- Begin Message ---
 conf/checksums.ini |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

New commits:
commit cc22d329a1e60221bef542fc45308bb12557f497
Author: Holger Freyther <[EMAIL PROTECTED](none)>
Date:   Tue May 20 19:12:59 2008 +0200

    [checksums] Add my sums for diversity-maps-taipei

commit 8bc9923d527faa41ee0119856836c7c0ad205eef
Author: Holger Freyther <[EMAIL PROTECTED](none)>
Date:   Tue May 20 19:12:45 2008 +0200

    [checksums] Add my sums for diversity-maps-providence




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-05-20 20:23:56 +0200 (Tue, 20 May 2008)
New Revision: 4443

Modified:
   trunk/src/target/opkg/libopkg/args.c
   trunk/src/target/opkg/libopkg/hash_table.c
   trunk/src/target/opkg/libopkg/opkg.c
   trunk/src/target/opkg/libopkg/opkg_conf.c
   trunk/src/target/opkg/libopkg/opkg_conf.h
   trunk/src/target/opkg/libopkg/opkg_download.c
   trunk/src/target/opkg/libopkg/opkg_install.c
   trunk/src/target/opkg/libopkg/opkg_remove.c
   trunk/src/target/opkg/libopkg/opkg_upgrade.c
   trunk/src/target/opkg/libopkg/pkg.c
   trunk/src/target/opkg/libopkg/pkg_hash.c
   trunk/src/target/opkg/libopkg/pkg_parse.c
   trunk/src/target/opkg/libopkg/pkg_vec.c
   trunk/src/target/opkg/tests/libopkg_test.c
Log:
opkg: (leak fixing, day 2) lots and lots of memory leaks fixed


Modified: trunk/src/target/opkg/libopkg/args.c
===================================================================
--- trunk/src/target/opkg/libopkg/args.c        2008-05-19 17:00:44 UTC (rev 
4442)
+++ trunk/src/target/opkg/libopkg/args.c        2008-05-20 18:23:56 UTC (rev 
4443)
@@ -83,6 +83,12 @@
 
 void args_deinit(args_t *args)
 {
+     free (args->offline_root);
+     free (args->offline_root_pre_script_cmd);
+     free (args->offline_root_post_script_cmd);
+
+     free (args->dest);
+     free (args->tmp_dir);
      free(args->conf_file);
      args->conf_file = NULL;
 }

Modified: trunk/src/target/opkg/libopkg/hash_table.c
===================================================================
--- trunk/src/target/opkg/libopkg/hash_table.c  2008-05-19 17:00:44 UTC (rev 
4442)
+++ trunk/src/target/opkg/libopkg/hash_table.c  2008-05-20 18:23:56 UTC (rev 
4443)
@@ -85,6 +85,7 @@
     /* free the reminaing entries */
     for (i = 0; i < hash->n_entries; i++) {
        hash_entry_t *hash_entry = (hash->entries + i);
+       free (hash_entry->key);
        /* skip the first entry as this is part of the array */
        hash_entry = hash_entry->next;
         while (hash_entry)

Modified: trunk/src/target/opkg/libopkg/opkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.c        2008-05-19 17:00:44 UTC (rev 
4442)
+++ trunk/src/target/opkg/libopkg/opkg.c        2008-05-20 18:23:56 UTC (rev 
4443)
@@ -175,6 +175,7 @@
   free (p->description);
   free (p->tags);
   free (p->url);
+  free (p->repository);
 
   free (p);
 }
@@ -202,6 +203,10 @@
 
   opkg_conf_deinit (opkg->conf);
   args_deinit (opkg->args);
+  free (opkg->options);
+  free (opkg->args);
+  free (opkg->conf);
+  free (opkg);
 }
 
 int
@@ -359,7 +364,7 @@
 opkg_install_package (opkg_t *opkg, const char *package_name, 
opkg_progress_callback_t progress_callback, void *user_data)
 {
   int err;
-  char *package_id = NULL, *stripped_filename;
+  char *stripped_filename;
   opkg_progress_data_t pdata;
   pkg_t *old, *new;
   pkg_vec_t *deps, *all;
@@ -470,9 +475,6 @@
   pdata.action = OPKG_INSTALL;
   progress (pdata, 75);
 
-  if (!package_id)
-    package_id = strdup (package_name);
-
   /* unpack the package */
   err = opkg_install_pkg(opkg->conf, new, 0);
 
@@ -658,6 +660,7 @@
   pkg_src_t *src;
   int sources_list_count, sources_done;
   opkg_progress_data_t pdata;
+  char *tmp_file_name = NULL;
 
   opkg_assert (opkg != NULL);
 
@@ -723,7 +726,6 @@
     sprintf_alloc (&list_file_name, "%s/%s", lists_dir, src->name);
     if (src->gzip)
     {
-      char *tmp_file_name;
       FILE *in, *out;
       struct _curl_cb_data cb_data;
 
@@ -758,6 +760,7 @@
     }
     else
       err = opkg_download (opkg->conf, url, list_file_name, NULL, NULL);
+    free (tmp_file_name);
 
     if (err)
     {
@@ -776,8 +779,6 @@
       sprintf_alloc (&url, "%s/%s", src->value, "Packages.sig");
 
     /* create temporary file for it */
-    char *tmp_file_name;
-
     sprintf_alloc (&tmp_file_name, "%s/%s", tmp, "Packages.sig");
 
     err = opkg_download (opkg->conf, url, tmp_file_name, NULL, NULL);

Modified: trunk/src/target/opkg/libopkg/opkg_conf.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_conf.c   2008-05-19 17:00:44 UTC (rev 
4442)
+++ trunk/src/target/opkg/libopkg/opkg_conf.c   2008-05-20 18:23:56 UTC (rev 
4443)
@@ -330,6 +330,7 @@
 
      free(conf->tmp_dir); /*XXX*/
      free(conf->lists_dir);
+     free(conf->pending_dir);
 
      pkg_src_list_deinit(&conf->pkg_src_list);
      pkg_dest_list_deinit(&conf->pkg_dest_list);
@@ -578,7 +579,7 @@
                    opkg_message(conf, OPKG_NOTICE, "defaulting architecture %s 
priority to 10\n", name);
                    value = strdup("10");
               }
-              nv_pair_list_append(&conf->arch_list, strdup(name), 
strdup(value));
+              nv_pair_list_append(&conf->arch_list, name, value);
          } else {
               fprintf(stderr, "WARNING: Ignoring unknown configuration "
                       "parameter: %s %s %s\n", type, name, value);

Modified: trunk/src/target/opkg/libopkg/opkg_conf.h
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_conf.h   2008-05-19 17:00:44 UTC (rev 
4442)
+++ trunk/src/target/opkg/libopkg/opkg_conf.h   2008-05-20 18:23:56 UTC (rev 
4443)
@@ -50,7 +50,7 @@
 
      char *tmp_dir;
      char *lists_dir;
-     const char *pending_dir;
+     char *pending_dir;
 
      /* options */
      int autoremove;

Modified: trunk/src/target/opkg/libopkg/opkg_download.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_download.c       2008-05-19 17:00:44 UTC 
(rev 4442)
+++ trunk/src/target/opkg/libopkg/opkg_download.c       2008-05-20 18:23:56 UTC 
(rev 4443)
@@ -99,19 +99,26 @@
            free (userpwd);
        }
        res = curl_easy_perform (curl);
-       curl_easy_cleanup (curl);
        fclose (file);
        if (res)
        {
            long error_code;
            curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &error_code);
            opkg_message(conf, OPKG_ERROR, "Failed to download %s, error %d\n", 
src, error_code);
+           free(tmp_file_location);
+            free(src_basec);
+           curl_easy_cleanup (curl);
            return res;
        }
+       curl_easy_cleanup (curl);
 
     }
     else
+    {
+       free(tmp_file_location);
+        free(src_basec);
        return -1;
+    }
 
     err = file_move(tmp_file_location, dest_file_name);
 

Modified: trunk/src/target/opkg/libopkg/opkg_install.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_install.c        2008-05-19 17:00:44 UTC 
(rev 4442)
+++ trunk/src/target/opkg/libopkg/opkg_install.c        2008-05-20 18:23:56 UTC 
(rev 4443)
@@ -394,6 +394,7 @@
      }
 
      if (ndepends <= 0) {
+         pkg_vec_free(depends);
          return 0;
      }
 
@@ -966,7 +967,7 @@
               signal(SIGINT, old_handler);
          else
               sigprocmask(SIG_UNBLOCK, &newset, &oldset);
-
+          pkg_vec_free (replacees);
          return 0;
      
 
@@ -996,6 +997,7 @@
          else
               sigprocmask(SIG_UNBLOCK, &newset, &oldset);
 
+          pkg_vec_free (replacees);
          return err;
      }
      opkg_set_current_state (conf, OPKG_STATE_NONE, NULL);

Modified: trunk/src/target/opkg/libopkg/opkg_remove.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_remove.c 2008-05-19 17:00:44 UTC (rev 
4442)
+++ trunk/src/target/opkg/libopkg/opkg_remove.c 2008-05-20 18:23:56 UTC (rev 
4443)
@@ -271,6 +271,8 @@
               free(dependents);
               if (err) return err;
          }
+          if (dependents)
+              free(dependents);
      }
 
      if ( message==0 ){

Modified: trunk/src/target/opkg/libopkg/opkg_upgrade.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_upgrade.c        2008-05-19 17:00:44 UTC 
(rev 4442)
+++ trunk/src/target/opkg/libopkg/opkg_upgrade.c        2008-05-20 18:23:56 UTC 
(rev 4443)
@@ -72,6 +72,8 @@
           old->state_want = SW_DEINSTALL;
      }
 
+    free(old_version);
+    free(new_version);
      new->state_flag |= SF_USER;
      return opkg_install_pkg(conf, new,1);
 }

Modified: trunk/src/target/opkg/libopkg/pkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/pkg.c 2008-05-19 17:00:44 UTC (rev 4442)
+++ trunk/src/target/opkg/libopkg/pkg.c 2008-05-20 18:23:56 UTC (rev 4443)
@@ -142,6 +142,19 @@
      return 0;
 }
 
+void compound_depend_deinit (compound_depend_t *depends)
+{
+    int i;
+    for (i = 0; i < depends->possibility_count; i++)
+    {
+        depend_t *d;
+        d = depends->possibilities[i];
+        free (d->version);
+        free (d);
+    }
+    free (depends->possibilities);
+}
+
 void pkg_deinit(pkg_t *pkg)
 {
      int i;
@@ -171,59 +184,59 @@
      pkg->state_flag = SF_OK;
      pkg->state_status = SS_NOT_INSTALLED;
 
+     //for (i = 0; i < pkg->replaces_count; i++)
+     free (pkg->replaces);
+     pkg->replaces = NULL;
+
      for (i = 0; i < pkg->depends_count; i++)
        free (pkg->depends_str[i]);
      free(pkg->depends_str);
      pkg->depends_str = NULL;
-     pkg->depends_count = 0;
 
      for (i = 0; i < pkg->provides_count; i++)
        free (pkg->provides_str[i]);
      free(pkg->provides_str);
      pkg->provides_str = NULL;
-     pkg->provides_count = 0;
 
      for (i = 0; i < pkg->conflicts_count; i++)
        free (pkg->conflicts_str[i]);
      free(pkg->conflicts_str);
      pkg->conflicts_str = NULL;
-     pkg->conflicts_count = 0;
 
      for (i = 0; i < pkg->replaces_count; i++)
        free (pkg->replaces_str[i]);
      free(pkg->replaces_str);
      pkg->replaces_str = NULL;
-     pkg->replaces_count = 0;
 
      for (i = 0; i < pkg->recommends_count; i++)
        free (pkg->recommends_str[i]);
      free(pkg->recommends_str);
      pkg->recommends_str = NULL;
-     pkg->recommends_count = 0;
 
+     for (i = 0; i < pkg->suggests_count; i++)
+       free (pkg->suggests_str[i]);
+     free(pkg->suggests_str);
+     pkg->suggests_str = NULL;
+
      if (pkg->depends)
      {
        int count = pkg->pre_depends_count + pkg->depends_count + 
pkg->recommends_count + pkg->suggests_count;
        int x;
 
        for (x = 0; x < count; x++)
-       {
-         compound_depend_t *depends;
-        depends = &pkg->depends[x];
-
-         for (i = 0; i < depends->possibility_count; i++)
-         {
-           depend_t *d;
-           d = depends->possibilities[i];
-           free (d->version);
-           free (d);
-        }
-        free (depends->possibilities);
-       }
+        compound_depend_deinit (&pkg->depends[x]);
        free (pkg->depends);
      }
+
+     if (pkg->conflicts)
+     {
+       int x;
+       for (x = 0; x < pkg->conflicts_count; x++)
+         compound_depend_deinit (&pkg->conflicts[x]);
+       free (pkg->conflicts);
+     }
+
      free (pkg->provides);
-     free (pkg->conflicts);
 
      pkg->pre_depends_count = 0;
      free(pkg->pre_depends_str);
@@ -1398,6 +1411,7 @@
          }
 
          str_list_deinit(pkg->installed_files);
+         free (pkg->installed_files);
      }
 
      pkg->installed_files = NULL;
@@ -1800,5 +1814,6 @@
                    opkg_message(conf, OPKG_NOTICE, "pkg_write_filelist pkg=%s 
returned %d\n", pkg->name, err);
          }
      }
+     pkg_vec_free (installed_pkgs);
      return 0;
 }

Modified: trunk/src/target/opkg/libopkg/pkg_hash.c
===================================================================
--- trunk/src/target/opkg/libopkg/pkg_hash.c    2008-05-19 17:00:44 UTC (rev 
4442)
+++ trunk/src/target/opkg/libopkg/pkg_hash.c    2008-05-20 18:23:56 UTC (rev 
4443)
@@ -73,7 +73,9 @@
   }
 
   abstract_pkg_vec_free (ab_pkg->provided_by);
+  abstract_pkg_vec_free (ab_pkg->replaced_by);
   pkg_vec_free (ab_pkg->pkgs);
+  free (ab_pkg->depended_upon_by);
   free (ab_pkg->name);
   free (ab_pkg);
 }

Modified: trunk/src/target/opkg/libopkg/pkg_parse.c
===================================================================
--- trunk/src/target/opkg/libopkg/pkg_parse.c   2008-05-19 17:00:44 UTC (rev 
4442)
+++ trunk/src/target/opkg/libopkg/pkg_parse.c   2008-05-20 18:23:56 UTC (rev 
4443)
@@ -140,12 +140,15 @@
   pkg->revision = "";
   pkg->familiar_revision = "";
 
+  if (!pkg->version)
+  {
   pkg->version= malloc(strlen(raw)+1);
   if ( pkg->version == NULL ) {
      fprintf(stderr, "%s: out of memory \n", __FUNCTION__);
      return ENOMEM;
   }
   strcpy(pkg->version, raw);
+  }
 
   hyphen= strrchr(pkg->version,'-');
 
@@ -304,6 +307,7 @@
            else if(isGenericFieldType("Installed-Time:", *lines)) {
                char *time_str = parseGenericFieldType("Installed-Time", 
*lines);
                pkg->installed_time = strtoul(time_str, NULL, 0);
+               free (time_str);
            }       
            break;
 
@@ -376,7 +380,11 @@
     *raw = lines;
 /* If the ipk has not a Provides line, we insert our false line */ 
     if ( pkg_false_provides==1)
-       pkg->provides_str = parseDependsString ((char *)"Provides: 
opkg_internal_use_only ", &pkg->provides_count);
+    {
+       pkg->provides_count = 1;
+       pkg->provides_str = malloc (sizeof (char*));
+       pkg->provides_str[0] = strdup ("opkg_internal_use_only");
+    }
 
     if (pkg->name) {
        return 0;

Modified: trunk/src/target/opkg/libopkg/pkg_vec.c
===================================================================
--- trunk/src/target/opkg/libopkg/pkg_vec.c     2008-05-19 17:00:44 UTC (rev 
4442)
+++ trunk/src/target/opkg/libopkg/pkg_vec.c     2008-05-20 18:23:56 UTC (rev 
4443)
@@ -185,6 +185,8 @@
 
 void abstract_pkg_vec_free(abstract_pkg_vec_t *vec)
 {
+    if (!vec)
+      return;
     free(vec->pkgs);
     free(vec);
 }

Modified: trunk/src/target/opkg/tests/libopkg_test.c
===================================================================
--- trunk/src/target/opkg/tests/libopkg_test.c  2008-05-19 17:00:44 UTC (rev 
4442)
+++ trunk/src/target/opkg/tests/libopkg_test.c  2008-05-20 18:23:56 UTC (rev 
4443)
@@ -38,6 +38,7 @@
 package_list_upgradable_callback (opkg_t *opkg, opkg_package_t *pkg, void 
*data)
 {
   printf ("%s - %s\n", pkg->name, pkg->version);
+  opkg_package_free (pkg);
 }
 
 void
@@ -91,11 +92,11 @@
     if (pkg)
     {
       print_package (pkg);
-      opkg_package_free (find_pkg);
       opkg_package_free (pkg);
     }
     else
       printf ("Package \"%s\" not found!\n", find_pkg->name);
+    opkg_package_free (find_pkg);
   }
   else
     printf ("No package available to test find_package.\n");




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to