~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/io/inkjar.cpp

  • Committer: JazzyNico
  • Date: 2011-08-29 20:25:30 UTC
  • Revision ID: nicoduf@yahoo.fr-20110829202530-6deuoz11q90usldv
Code refactoring and merging with trunk (revision 10599).

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
#endif
140
140
 
141
141
    if (signature == 0x08074b50) {
142
 
        //skip data descriptor
143
 
        bytes = (guint8 *)malloc(sizeof(guint8) * 12);
144
 
        if (!read(bytes, 12)) {
145
 
            g_free(bytes);
146
 
            return false;
147
 
        }
 
142
    //skip data descriptor
 
143
        bytes = (guint8 *)g_malloc(sizeof(guint8) * 12);
 
144
        if (!read(bytes, 12)) {
 
145
            g_free(bytes);
 
146
            return false;
 
147
        } else {
 
148
            g_free(bytes);
 
149
        }
148
150
    } else if (signature == 0x02014b50 || signature == 0x04034b50) {
149
 
        return true;
 
151
        return true;
150
152
    } else {
151
 
        return false;
 
153
        return false;
152
154
    }
153
155
    return false;
154
156
}
214
216
        if (_last_filename != NULL)
215
217
            g_free(_last_filename);
216
218
        _last_filename = NULL;
 
219
        g_free(bytes);
217
220
        return NULL;
218
221
    }
219
222