From: discomfitor Date: Mon, 24 Jan 2011 01:59:09 +0000 (+0000) Subject: From: Mike McCormack X-Git-Tag: build/2012-07-04.173327~1358 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=524fc3fc377c4769ea80f3264a2f4c5e43346d75;p=profile%2Fivi%2Fecore.git From: Mike McCormack ecore_config code may end up closing stdin, due to assuming 0 is a valid fd. I know this code is deprecated, and it's being kept around "for reference". Either: A) this bug should still be fixed so bad code is not copied elsewhere OR B) ecore_config should be deleted so bad code is not copied elsewhere thanks, Mike git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@56275 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore_config/ecore_config.c b/src/lib/ecore_config/ecore_config.c index ddfc64f..d8b587e 100644 --- a/src/lib/ecore_config/ecore_config.c +++ b/src/lib/ecore_config/ecore_config.c @@ -1636,7 +1636,7 @@ ecore_config_init_global(const char *name) snprintf(buf, PATH_MAX, "%s/.ecore/%s/.global", p, name); global = creat(buf, S_IRWXU); - if (global) + if (global >= 0) close(global); free(buf);