Changeset 13073


Ignore:
Timestamp:
01/10/12 00:44:30 (12 years ago)
Author:
nit
Message:

[titan] fix memleaks and del system

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/ipkg.h

    r13070 r13073  
    288288        tmpstr1 = ostrcat("", path, 0, 0);
    289289        ret1 = strsplit(tmpstr1, "/", &count1);
     290        free(tmpstr1); tmpstr1 = NULL;
    290291        int max = count1;
    291292        int i = 0;
    292293        int withoutgui = 0;
    293         for( i = 0; i < max; i++){
     294       
     295        for(i = 0; i < max; i++)
     296        {
    294297                if(ostrcmp("Packages.gz", (&ret1[i])->part) == 0)
    295298                        withoutgui = 1;
    296299        }
    297         free(ret1),ret1 = NULL;
     300        free(ret1); ret1 = NULL;
     301       
    298302        if(withoutgui == 1)
    299303        {
     
    302306                        if(ostrcmp(path, "//97.74.32.10/svn/ipk/sh4/titan") != 0)               
    303307                        {
    304                                 printf("path: %s", path);
    305308                                textbox(_("Message"), _("check your Secret Feed !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 5, 0);               
     309                                free(ip); ip = NULL;
    306310                                return;
    307311                        }
     
    317321                        tmppath = string_replace("Packages.gz", "Packages.preview.tar.gz", tmppath, 0);
    318322                        gethttp(ip, tmppath, 80, "/tmp/Packages.preview.tar.gz", "YXRlbWlvOkZIWlZCR2huemZ2RWhGREZUR3p1aWY1Njc2emhqR1RVR0JOSGpt", NULL);
    319                         free(tmppath),tmppath = NULL;
     323                        free(tmppath); tmppath = NULL;
     324                       
    320325                        system("tar -zxvf /tmp/Packages.preview.tar.gz -C /tmp");
    321326                        unlink("/tmp/Packages.preview.tar.gz");
    322                         char* cmd = NULL;
    323                         cmd = ostrcat("touch ", checkfile, 0, 0);
    324                         system(cmd);
    325                         free(cmd),cmd = NULL;
    326                 }
    327                 free(checkfile),checkfile = NULL;               
     327                        writesys(checkfile, ".", 1);
     328                }
     329                free(checkfile); checkfile = NULL;             
    328330                err = gethttp(ip, path, 80, (char*)filename, "YXRlbWlvOkZIWlZCR2huemZ2RWhGREZUR3p1aWY1Njc2emhqR1RVR0JOSGpt", NULL);
    329331        }
     
    332334
    333335        free(ip); ip = NULL;
    334         printf("out");
    335336        return err;
    336337}
Note: See TracChangeset for help on using the changeset viewer.