? .example.html.swp
? 1
? 2
? 561990-variable-stampede.patch.1
? 688294-die_db_is_active_die_for_real3.patch.1
? 699440_entity_uri_57.patch.1
? 794184-contact.patch.1
? 822418_field_access_form.patch.1
? Administer | Site-Install_1270876071993.png
? Application | examiner_d7_1269411390030.png
? Garland | Site-Install_1271755366138.png
? Modules | Site-Install_1269789543096.png
? XHProf: Hierarchical Profiler Report_1268801688867.png
? XHProf: Hierarchical Profiler Report_1270101901400.png
? amnesty_features.module
? attributes_php.txt
? blame
? bogus_user_loads.patch.1
? bootstrap.patc
? dashboard_default.patch.1
? data_unpack.patch.1
? default.png
? drupal.path-front-page.9.patch.1
? drupal_static_cleanup_0.patch.1
? empty.txt
? entity_field_bootstrap.patch.1
? entity_revisions.patch.1
? ex-remote
? examiner_d7_1270691754497.png
? example.html
? f
? fatal.patch
? field_info.patch.1
? file.patch
? file_field_load.patch
? filter_caching.patch
? filter_caching.patch.1
? filter_url_6.patch.1
? filters.patch.1
? foo.js
? foo.php
? gut_node_types_2.patch.1
? hack.txt
? head.png
? image.styles.patch
? install.png
? jquery.xwindow_name.js
? limit.patch
? link.png
? lock.patch
? lucid-mariadb-ourdelta.list
? lucid-mariadb-ourdelta.list.1
? lucid-mariadb-ourdelta.list.2
? memcache-lock.inc__4.txt
? memory.php
? minimum.png
? mollom.patch
? ncm.diff
? node_type_gutting_4_0.patch.1
? node_type_gutting_4_0.patch.2
? patch.png
? path.patch
? path_inc.patcfh
? path_inc.patchj
? render_cache.patch
? render_cache_4.diff
? render_cache_4.diff.1
? rendercache_1.diff
? revisions.patc
? sites
? taxonomy_field_name.patch.1
? taxonomy_field_validate.patch.1
? taxonomy_options.patch.1
? taxonomy_static.patch.1
? taxonomy_term_save_a_bit_faster.patch.1
? term.patch
? tick.php
? url.php
? user_save.diff
? includes/drupal_unpack_1.patch
? includes/errors.inc
? modules/statistics/sedMC2GAd
? modules/update/update.patch
? modules/user/user_data.patch
Index: modules/image/image.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/image/image.module,v
retrieving revision 1.45
diff -u -p -r1.45 image.module
--- modules/image/image.module	9 Aug 2010 19:55:57 -0000	1.45
+++ modules/image/image.module	15 Aug 2010 19:20:15 -0000
@@ -658,11 +658,10 @@ function image_style_generate() {
   // acquiring the lock.
   $success = file_exists($destination) || image_style_create_derivative($style, $path, $destination);
 
-  if (!empty($lock_acquired)) {
-    lock_release($lock_name);
-  }
-
   if ($success) {
+    if (!empty($lock_acquired)) {
+      lock_release($lock_name);
+    }
     $image = image_load($destination);
     file_transfer($image->source, array('Content-Type' => $image->info['mime_type'], 'Content-Length' => $image->info['file_size']));
   }
