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