src/haptic/linux/SDL_syshaptic.c
changeset 9360 c671d8ca48a1
parent 9266 f6355bfca853
child 9619 b94b6d0bff0f
equal deleted inserted replaced
9359:3d0af39849fa 9360:c671d8ca48a1
   286     if (item == NULL) {
   286     if (item == NULL) {
   287         return -1;
   287         return -1;
   288     }
   288     }
   289 
   289 
   290     item->fname = SDL_strdup(path);
   290     item->fname = SDL_strdup(path);
   291     if ( (item->fname == NULL) ) {
   291     if (item->fname == NULL) {
   292         SDL_free(item->fname);
       
   293         SDL_free(item);
   292         SDL_free(item);
   294         return -1;
   293         return -1;
   295     }
   294     }
   296 
   295 
   297     /* TODO: should we add instance IDs? */
   296     /* TODO: should we add instance IDs? */