Ticket #2742: 030-bash_inputrc___mc-4.8.8.patch
File 030-bash_inputrc___mc-4.8.8.patch, 1.1 KB (added by er13, 11 years ago) |
---|
-
src/subshell.c
267 267 putenv (g_strdup (sid_str)); 268 268 } 269 269 270 char *putenv_str = NULL; 270 271 switch (subshell_type) 271 272 { 272 273 case BASH: 274 /* Do we have a custom init file ~/.local/share/mc/bashrc? */ 273 275 init_file = mc_config_get_full_path ("bashrc"); 274 276 277 /* Otherwise use ~/.bashrc */ 275 278 if (access (init_file, R_OK) == -1) 276 279 { 277 280 g_free (init_file); … … 286 289 char *input_file = mc_config_get_full_path ("inputrc"); 287 290 if (access (input_file, R_OK) == 0) 288 291 { 289 char *putenv_str = g_strconcat ("INPUTRC=", input_file, NULL);292 putenv_str = g_strconcat ("INPUTRC=", input_file, NULL); 290 293 putenv (putenv_str); 291 g_free (putenv_str);294 /* Do not use "g_free (putenv_str)" here, otherwise INPUTRC will be undefined! */ 292 295 } 293 296 g_free (input_file); 294 297 } … … 351 354 352 355 /* If we get this far, everything failed miserably */ 353 356 g_free (init_file); 357 g_free (putenv_str); 354 358 my_exit (FORK_FAILURE); 355 359 } 356 360